By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,521 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,521 IT Pros & Developers. It's quick & easy.

ADO data type validation is inconsistant with SS2K's

P: n/a
I have a sql command with a SearchDate parameter of type date. When I
execute its stored procedure from Query Analyzer (to SS2K) with a date out
of the valid datetime range,

EXEC [SomeSP] @SearchDate = '11/1/0200 12:00:00 AM'

I get no error because the stored procedure properly handles out of range
dates by ignoring them.

If I send the sql command on its merry way properly paramaterized in .Net,
on the other hand, I get this error whether or not my stored procedure can
handle the out of range date:

"System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be
between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM."

Either a client-side ADO method is disagreeing with server-side data
validation, showing unneeded redundancy, or QA and ADO are using drivers
with differing data validation methods, causing inconsistant behavior.

Which is it? Either way reveals a poor design decision.

Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.