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)
 String was not recognised as a valid DateTime

Author  Topic 

tadhg88
Yak Posting Veteran

62 Posts

Posted - 2007-12-03 : 13:03:24
Hi i have a web app written in asp.net and c# but i am getting this error when i run my web app on a different laptop to the one i develop on and i cannot figure out why one pc gives the error and one doesnt, I guess its some SQL Server setting that differs on both pcs but i dont know how to find it. Any help of advice would really be appreciated
Thanks in advance
Tim

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-12-03 : 13:59:02
Make sure the parameters in the stored procedure are DATETIMES, and you will be on the safe side because you then can validate the entered dates on the client side instead.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

tadhg88
Yak Posting Veteran

62 Posts

Posted - 2007-12-04 : 06:31:38
thanks for ur reply
yes the values on the stored procedure are ok but i need to change something in my app to avoid probs with different date formats
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-12-04 : 06:41:29
In your client app, provide information to user to always enter date in a specific format.
Then check format of date entered to see if it follows new rules. Then check for ISDATE function.
And last send to database.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -