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

asked 29 May '15, 13:45

Veselin%20Ivanov's gravatar image

Veselin Ivanov
44679
accept rate: 0%


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.

permanent link

answered 29 May '15, 18:08

Nick%20Elson%20SAP%20SQL%20Anywhere's gravatar image

Nick Elson S...
7.3k35107
accept rate: 32%

edited 30 May '15, 06:19

Volker%20Barth's gravatar image

Volker Barth
40.1k361549819

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

permanent link

answered 29 May '15, 18:18

Nick%20Elson%20SAP%20SQL%20Anywhere's gravatar image

Nick Elson S...
7.3k35107
accept rate: 32%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×260
×10

question asked: 29 May '15, 13:45

question was seen: 3,406 times

last updated: 30 May '15, 06:19