471,874 Members | 1,596 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,874 software developers and data experts.

ADODB.Recordset from Datatable problem in VB.Net 2005

Not sure in which group to post, sorry...

We are using VB2005 on Windows XP.

After getting my data in a datatable and parse it to a recordset according
to the method on
http://www.codeproject.com/cs/databa...oRecordset.asp ,
which learned us to convert an ADO.Net datatable to an ADODB.Recordset,
needed by the Microsoft Office Spreadsheet Web Component (OWC11),
we got an error on the checking of a TIME column.

The valuekind of the column, which gives us the error
"A first chance exception of type 'System.ArgumentException' occurred in
is of type "System.TimeSpan".
In the datatable we see the values as for example "09:40:45", but
transferred to the recordset,
I get that awful error on each value, and as a result my time column in the
OWC is empty.

Adding a statement
Case "System.TimeSpan"
Return ADODB.DataTypeEnum.adDate
in the TranslateType Function on the mentionned link
does not resolve anything, even if the type is indeed a System.TimeSpan...
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
[It's nice to be important, but it's more important to be nice!]
Apr 6 '07 #1
0 3381

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Channing Jones | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.