B
Bob
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.
Bob
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.
Bob