By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,136 Members | 2,145 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,136 IT Pros & Developers. It's quick & easy.

ADODB.Recordset from Datatable problem in VB.Net 2005

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.