473,383 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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

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
1 10251
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Navs | last post by:
Hi, I am trying to insert a TIME value in a SQL Server 2008 database using a simple ODBC C program. I follow the steps below: 1. Connect and Allocate Statement handle 2. Prepare a Statement...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.