Hi,

> -----Original Message-----
> From: ilMes mes [mailto:[EMAIL PROTECTED]
> Sent: Mittwoch, 21. Januar 2004 21:39
> To: [EMAIL PROTECTED]
> Subject: Compatibility problem ADO<->MaxDB with TIMESTAMP columns
> 
> 
> 
> MaxDB v.7.5.00.08 on Linux Red Hat 8.0
> ODBC on Windows "SAP DB 7.05.00.00"
> ADO 2.8 and Visual Basic 6.0 SP5
> 
> Compatibility problem ADO<->MaxDB with TIMESTAMP columns
> 
> I have a table like:
> create table XX (
>   ID INTEGER NOT NULL,
>   MYDATE TIMESTAMP DEFAULT TIMESTAMP,
>   PRIMARY KEY(ID)
> )
> 
[description of problems with timestamps due to differences between MSAccess and SAP 
DB snipped]

If you only want to have date and time, why not defining two columns, namely for date 
and time.


The ODBC reference describs the timestamp data type as follows:

struct tagTIMESTAMP_STRUCT {
     SQLSMALLINT year; 
     SQLUSMALLINT month; 
     SQLUSMALLINT day; 
     SQLUSMALLINT hour; 
     SQLUSMALLINT minute; 
     SQLUSMALLINT second; 
     SQLUINTEGER fraction;
} TIMESTAMP_STRUCT

The value of the fraction field is the number of billionths of a second and ranges 
from 0 through 999,999,999 (1 less than 1 billion). For example, the value of the 
fraction field for a half-second is 500,000,000, for a thousandth of a second (one 
millisecond) is 1,000,000, for a millionth of a second (one microsecond) is 1,000, and 
for a billionth of a second (one nanosecond) is 1.

Therefore

> But, TIMESTAMP is in the format '2004-01-01 11:22:33.697500' with 
> microsecond!!

is a valid timestamp due to the reference. That MSAccess does not take the fraction
into account is IMO not a fault of SAP DB.

> My opinion is that should to be necessary to can specify a 
> DEFAULT value 
> more flexible, and to have a TIMESTAMP without microsecoud.

As I already wrote, two columns with date and time will give you a
timestamp without fraction.


Regards  Thomas

----------------------------------------------
Dr. Thomas K�tter
SAP DB, 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