Iterating an ADODB RecordSet using System.Reflection

J

Jules

Everyone,

I have to be able to retrieve data from ADODB RecordSet, but without
referencing the ADODB interop. I do get a RecordSet object, but when I
try to use a DataAdapter to populate a Dataset:
myDataAdapter.Fill(myDataSet, myRecordSetObject, "MyTableName");
I get the exception:
Row handles must be released before new ones can be created.

Any simple ideas how I can do this? It woudl only be a few records, in
read-only access.

Many thanks,
Jules
 
C

Cor Ligthert [MVP]

Jules,

Why don't you get direct the adonet dataset.

This overloaded Fill function is in my idea a very seldom used method, which
needs investigation by yourself if you try it and it goes wrong. I have in
these newsgroups seen two times people who tried it, you can almost nothing
with it.

http://msdn2.microsoft.com/en-us/library/4sscb8xe.aspx


Cor
 
J

Jules

Cor,

thanks, but I'm not sure I understand. I can't use the interop. Both
DataAdapter.Fill() overloads, the one quoted belown and the one that
uses a DataTable, return the same exception. All I need is to read
these records using Reflection.

Cheers,
Eric
 
C

Cor Ligthert [MVP]

Jules,

I and probably most of us don't understand why you need to use the files
using reflection, are you not authorized to those files or something and are
they on a server of somebody else?

Cor
 

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