DateTime_ODBC: There is a ODBC error when run the DateTime_ODBC.exe on x86 platform.



1. Windows XP SP3 CHS x86
2. Katmai 10.0.1600.22
3.    Sample 90810
4. VS 2005
5.    Create ODBC data source called DateTime by readme

Repro Steps:

1.   Build the DateTime_ODBC sample successfully.
2.   Run the script successfully “…\Engine\Data Access\odbc\DateTime_ODBC\scripts\ setup.sql”.
3.   Locate to "...\Engine\Data Access\odbc\DateTime_ODBC\cpp\Debug".
4.   Double click “DateTime_ODBC.exe”.


The DateTime_ODBC.exe should run properly without any exception.

Actual Results:

There is a ODBC error when run the DateTime_ODBC.exe:
Error: SQLSTATE=22003, Native error=0, msg=[Microsoft][SQL Server Native Client 10.0]Numeric value out of range.
Please see the attached files:
1.      Windows XP SP3 CHS x86: DateTime_ODBC_error.jpg
2.      AMD64 with the default configuration (Win32): AMD64_win32_error.jpg


This issue repro on AMD64 when building with the default configuration (Win32), but this sample works well when building with the configuration (X64).

file attachments


wrote Aug 27, 2009 at 5:36 PM

Check documentation to see whether it recommends 64bit build or if it includes WOW support.

wrote Aug 28, 2009 at 5:32 AM

There is the description "To build and run this sample as a 32-bit application on a 64-bit operating system, you must create the ODBC data source with the ODBC Administrator in %windir%\SysWOW64\odbcad32.exe. " in this sample readme on codeplex "http://msftdpprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008%21Readme_ODBC%20Date%20Time&referringTitle=Home".

wrote Feb 14, 2013 at 1:11 AM