|
-
September 24th, 2001, 12:17 AM
#1
ADO with SQL Server
Hi,
I am using SQL Server 2000 and I have a table with a date field created with the type datetime. Physically, the field is with the '/' separator. For example, 9/10/01 10:24:55AM. When I execute a Select statement in Query Analyzer, I find that it changes to '-' separation (09-10-2001 10:24:55AM). With ADO, the returned values is '/' separated. When I try to update the record with ADO, using the '/' separator, it is not allowing me to update the record. For example, when I execute the following query :
Update TableId Set Field1 = '1' where Date = '09/10/01 10:24:55AM'
it is not updating the record saying that the record is not found.
Can anyone help me with resolving this issue.
Thanks,
Anitha
-
September 24th, 2001, 01:20 AM
#2
Re: ADO with SQL Server
This is one of those typical date issues. Your client computer has it local settings set to /, where sql has set it to -. When executing the update statement, SQL server gets a string, not a date. he will try to convert it to date, but fails, because it's settigns are different
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|