Converting .NET DataTable to ADO Recordset

N

Nick Finch

Can anyone help. We have an Application that includes a
number of VBA addins. As a result, to be compatible with
old versions of Office Apps, we must convert any data from
a VB.NET DataTable to a disconnected ADO Recordset.

I have spent a bit of time looking at this, but can only
see references to using the DataAdaptor Update method,
which only seems to apply if the data originated from the
ADO Recordset. Does anyone know an efficient method of
converting a VB.NET DataTable to a disconnected ADODB
Recordset.

Thanks in advance
Nick
 
M

Miha Markic

Hi Nick,

AFAIK there is only support for recordset->datatable direction and not the
inverse.
You should code it yourself.
 
P

Paul Clement

¤ Can anyone help. We have an Application that includes a
¤ number of VBA addins. As a result, to be compatible with
¤ old versions of Office Apps, we must convert any data from
¤ a VB.NET DataTable to a disconnected ADO Recordset.
¤
¤ I have spent a bit of time looking at this, but can only
¤ see references to using the DataAdaptor Update method,
¤ which only seems to apply if the data originated from the
¤ ADO Recordset. Does anyone know an efficient method of
¤ converting a VB.NET DataTable to a disconnected ADODB
¤ Recordset.

Efficient or direct method, no, but it's possible if you don't mind writing a bit of code:

http://www.google.com/groups?hl=en&[email protected]&rnum=7


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
W

William Ryan

If you check out this month's Hard Core Visual Basic Newsletter,
www.hardcorevisualbasic.com Bill Vaughn has an article where he is "Doing
the Impossible (Again). He goes through using ADO.NET to create a classic
Recordset. I think you can get a free 30 day trial which will give you
access to it (although you probably would want to describe b/c there's some
really great stuff in there.)

HTH,

Bill
 

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