ADODB.Recordset from Datatable problem in VB.Net 2005

  • Thread starter Screaming Eagles 101
  • Start date
S

Screaming Eagles 101

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/database/DataTableToRecordset.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!]
----------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top