Issue Details (XML | Word | Printable)

Key: ODBC-154
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Alexander Potapchenko
Reporter: Mark Junker
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ODBC Driver

DATETIME value 1800-01-01 as parameter for SQL statement produces "value out of range" error

Created: 15/Oct/12 09:45 AM   Updated: 09/Jul/13 11:00 AM
Component/s: None
Affects Version/s: 2.0.1
Fix Version/s: 2.0.2

File Attachments: 1. Text File odbc-datetime-parameter-1800-01-01.patch (0.8 kB)

Environment: Tested on Win32/Win64, but it should affect all platforms


 Description  « Hide
When you create a SQL query with DATETIME parameters with a value of 1800-01-01 produces a "value out of range" error from the database. The problem is the MAKEQUAD function in OdbcConvert.cpp which returns invalid values for "a" (on little endian machines) when "a" is a value < 0.
I'll add a patch for this problem.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Junker added a comment - 15/Oct/12 09:47 AM
This patch allows to use DATETIME parameters with values such as '1800-01-01'

Alexander Potapchenko added a comment - 15/Oct/12 06:56 PM
Fixed in CVS. Thanks