Datetime in SQL server<>ADO
-
Hi! I use the Datetime dataype in SQL-Server 2000 to store date and time eg "2002-09-04 09:18:20". When I insert data in through VB6.0 and ADO 2.6 i set the in-parameter to an adDBTime and it seems to work fine. Could there be problems in the future and/or is there a better datatype in ADO for this case?
-
Hi! I use the Datetime dataype in SQL-Server 2000 to store date and time eg "2002-09-04 09:18:20". When I insert data in through VB6.0 and ADO 2.6 i set the in-parameter to an adDBTime and it seems to work fine. Could there be problems in the future and/or is there a better datatype in ADO for this case?
adDBTime was designed for that purpose. Who knows what could happen in the future though. You can use adVarChar too, if you like STL is a religeon. Enquiries to Reverend Christian Graus
-
adDBTime was designed for that purpose. Who knows what could happen in the future though. You can use adVarChar too, if you like STL is a religeon. Enquiries to Reverend Christian Graus
I found a nice matrix over datatypemappings SQL-server 2000 <> ADO 2.6 at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adosql/adoprg02\_294j.asp Refering to the matrix, varchar should be mapped to adChar, but adVarchar seems more logic to me. Is it an printerror?