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

[22003][0][Microsoft][ODBC SQL Server Driver]Numeric value out of range

P: n/a
Hi,
I have a php application connected through odbc to a sqlserver database.
When I try to execute select queries on a smalldatetime table field I
receive this message:

Warning: [22003][0][Microsoft][ODBC SQL Server Driver]Numeric value out of
range
The query is something like:

select dateField from table

Tha field is a normal smalldatetime one:
10/17/2001 12:35:00 PM

Whith Query Analyzer the query works fine.
I'm using php mssql_query() and ODBTP as protocol to connect to the DBMS

Thanks
Luigi

--
Message posted via http://www.sqlmonster.com
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Luigi Ida' via SQLMonster.com (fo***@SQLMonster.com) writes:
I have a php application connected through odbc to a sqlserver database.
When I try to execute select queries on a smalldatetime table field I
receive this message:

Warning: [22003][0][Microsoft][ODBC SQL Server Driver]Numeric value out of
range
The query is something like:

select dateField from table

Tha field is a normal smalldatetime one:
10/17/2001 12:35:00 PM

Whith Query Analyzer the query works fine.
I'm using php mssql_query() and ODBTP as protocol to connect to the DBMS


The error message from the ODBC driver, not SQL Server. Why you get the
error I have no idea. I don't know PHP, nor have I seen your code. But it
appears that the datetime value has been bound a numeric datatype somewhere
along the line, and that datatype can not fit the numeric represenation
of 2001-10-17, which is around 36000. (Smells 16-bit long way.)
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.