skip to main content
Product overview : OpenAccess SDK configurations and IP implementation : IgnoreDateTimeLiteral error
 

IgnoreDateTimeLiteral error

OpenAccess SDK supports non-ODBC date, time, and datetime/timestamp formats in pass-through and selective pass-through modes.
The support for these formats is valid for the following:
DDL statements: SELECT, INSERT, UPDATE, DELETE, and so on.
Data types: DATE, TIME, and DATETIME.
(For example, {d ‘1999/12/12’}, {t ‘12:32:29:253PM’}, and {ts ‘1998-11-23T11:25:43:250’}.)
For using non-ODBC date, time, and datetime/timestamp formats in pass-through and selective pass-through modes, you must set the IP_INFO_IGNORE_DATETIME_PARSE_ERROR information type to TRUE in the ipGetinfo() function. If not set, OpenAccess SDK throws an invalid date/time literal error. By default, the value is set to FALSE.
For more information, refer to DataDirect OpenAccess SDK™SQL Engine Programmer’s Reference for C/C++, DataDirect OpenAccess SDK™ SQL Engine Programmer’s Reference for Java®, and DataDirect OpenAccess SDK™ Programmer’s Reference for .NET guides.
Note: Before querying, the IP must modify the date/time literals in a way that is understandable by the backend data source.
Examples
DATETIME/TIMESTAMP
INSERT INTO datetime_table values (1, ‘2004-2-28T01:01:01’);
SELECT * FROM datetime_table WHERE dateTimeCol = {ts ‘2004-2-28T01:01:01’};
DATE
INSERT INTO date_table values(1, ‘2012/02/25’);
SELECT * FROM date_table WHERE dateCol = ‘2012/02/25’;
TIME
INSERT INTO time_table values(1, '02:02:02AM');
SELECT * FROM time_table WHERE timeCol = '02:02:02AM';