cancel
Showing results for 
Search instead for 
Did you mean: 

sa 16 DataTypeEnum adDBTime returns 145 instead of 134

Former Member
0 Kudos
3,871

sa 16.0.0.2043 DataTypeEnum adDBTime returns 145 instead of 134.

Provider = SAOLEDB.16 Error Description = Multiple-step operation generated errors. Check each status value.

Any suggestions? Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member

I assume you meant to say 135 (adDBTimeStamp) instead of 145 (which is not defined).

In the database server Date, Time, DateTime and TimeStamp are represented as timestamps (storage wise) and through the SQL Anywhere .Net API those SADbTypes will be mapped to System.DateTime. See the SADbType enumeration page for the reference on that. There should be a similar mapping for when you use the OleDB driver instead.

The fact that your are not using the ADO.Net provider could be causing some of the issues you are seeing there. To use an OleDB driver with ADO.Net you must go through a generic ADO-to-OLE/DB bridge layer and mappings may not work as expect in all cases. I do recommend testing with the SA.Net Data Provider to verify if the issue only exists when going through that bridge or is more general than that.

Former Member
0 Kudos

But if you are actually seeing 145 that may be because the OLE/DB will map our timestamps to DBTYPE_DBTIME2 (which would be correct for that driver) ... and the bridge is unable to convert that for some reason.

This OLE DB data type seems to have been introduced circa SQL SERVER 2008 and I suspect the ADO-to-OLEDB bridge (System.Data.Oledb) knows nothing about it (since it is much older technology and probably unchanged since long before that time.

FWIW there was a change of behavior with Version 16 where we can no longer support Borland Delphi with that driver because of the required introduction of this new datatype.

HTH