[EMAIL PROTECTED] wrote
> 
> Hi, thanks for this answer,
> 
> but how can I process a SQL_C_DATE type within a single sql-statement 
> 
> e.g.
> 
> INSERT INTO testtable VALUES ( 1, '01.01.2004')
> 
> If I exec this statement I get the following error :
> 
> Datetime field overflow;-3048 POS(35) Invalid date format:ISO.
> insert into testdatum values (1, '12.12.2004')
> 

As ISO is the default-date_time_format for ODBC, the server knows
that every string_literal (as your '01.01.2004') has to be written in ISO.
Every output is sent to ODBC using format ISO.

The format which can be used when using variables/parameters of ODBC-datatypes
is a different topic. But if you want to use these in an sql-statement, you
have to set the variable (in your example let us name it startdate to '01.01.2004')
and then use this variable in the sql-statement like this:
INSERT INTO testtable VALUES ( 1, :startdate )

Then ODBC has to handle the startdate-value to the format usually used by ODBC
and known by the server.

Elke
SAP Labs Berlin


> Best regards
> 
> tom
> 
> 
> 
> 
> 
> 
> "Koetter, Thomas Theodor" <[EMAIL PROTECTED]>
> 11.05.2004 09:39
> 
>  
>         An:     "'[EMAIL PROTECTED]'" 
> <[EMAIL PROTECTED]>, 
> [EMAIL PROTECTED]
>         Kopie: 
>         Thema:  RE: odbc driver
> 
> 
> Hi Tom
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Dienstag, 11. Mai 2004 07:14
> > To: [EMAIL PROTECTED]
> > Subject: odbc driver
> > 
> > 
> > Hi,
> > 
> > are there any plans to modify the odbc-driver to allow other 
> > date-formats 
> > than ISO-Date ?
> 
> With ODBC you can process any time, date, timestamp format if you
> use the appropriated data types like
> 
> SQL_C_TYPE_TIME
> SQL_C_TYPE_DATE
> SQL_C_TYPE_TIMESTAMP
> 
> cmp. the ODBC Programmer's Reference, Appendix D: C Data Types.
> Online accessible at www.microsoft.com
>  
> If you mean the conversion from e.g. date to character, cmp.
> Appendix D: Converting Data from C to SQL Data Types, C to SQL: Date
> 
> Excert:
> 
> When date C data is converted to character SQL data,
> the resulting character data is in the "yyyy-mm-dd" format.
> 
> 
> HTH  Thomas
> 
> 
> ----------------------------------------------
> Dr. Thomas K�tter
> SAP AG, SAP Labs Berlin
> 
> 
> Do you know SAP^H^H^H MaxDB ?                   www.sapdb.org 
> 
> 
>  
> 
> 
> 

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to