468,780 Members | 2,254 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,780 developers. It's quick & easy.

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
ADODB.dll",
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...
--
Filip
http://www.ww2airborne.net/
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 3263

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Channing Jones | last post: by
1 post views Thread by CARIGAR | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.