Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Date SP occasionaly errors out in US

Author  Topic 

miranwar
Posting Yak Master

125 Posts

Posted - 2003-05-12 : 12:07:21
Hi,

One of our business units in the states just recently upgraded thier servers.Since the date server was upgraded the VB invoicing applcation has occasionaly been logging error messages in a Custom SQL table. The error message is


"Invalid property value Invalid parameter type ;Call List:-frmInvHandler_tmrScan_Timer-frmInvHandler_invps03_SpExScan-basCommon_cmDate-clsData.ArSPExec: PrsgDate';Call List:-frmCA_CAIMain_caips01_DateSort'PRSGDATE"


Looks like the VB app is occasionally falling over when calling the PRSGDATE SP which returns the srver date using an output variable. The SP is as follows:



CREATE PROC prSgDate @dtDateOut datetime OUTPUT
AS


BEGIN

/* Retrieve system date */
Select @dtDateOut = GetDate()

return @@Rowcount
END



Is there any date setting in SQL server That i should know about that would stop this error message?. The control panel Reginal setting are US

ANy help would be greatly appreciated


X002548
Not Just a Number

15586 Posts

Posted - 2003-05-12 : 12:36:15
I don't know, but it's returning null for me..which I didn't expect...

Have to take a closer look..



Brett

8-)

[homer]doooooh...what a TOTAL Scrub[/homer]

Thought this should work:

DECLARE @dtDateOut datetime
Exec prSgDate @dtDateOut OUTPUT
SELECT @dtDateOut



Edited by - x002548 on 05/12/2003 12:46:05
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2003-05-12 : 20:09:26
Works properly every time I run it here.

I'm curious where the error is introduced. It might be worth adding some debug code to store intermediate values in a debug table.

It may be a VB or ADO error - the Stored procedure could be returning the date correctly.

Sam

Go to Top of Page

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2003-05-12 : 22:50:24
Just as an aside, I don't mean to be an anal-retentive pedant, but how do you pass a datetime to a stored procedure?

Better to pass and return a string version (ie varchar), formatted in the way you expect, and then create the date object in VB from the string result....

That's just my 2 cents - feel free to ask for clarification if you're not sure what I mean...

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page
   

- Advertisement -