Can I get an ADODB Recordset from SqlDataAdapter?

  • Thread starter Scott Greenbaum
  • Start date
S

Scott Greenbaum

I'm replacing some J++ ADO code with C## & ADO.NET using the
SqlDataAdapter and I need to return an ADODB Recordset. The
OleDbDataAdapter has a nice overload of the Fill method that will do
it:

DataSet myDS = new DataSet();
OleDbDataAdapter myDA = new OleDbDataAdapter();
Recordset myRS;
myDA.Fill(myDS, myRS, "MyTable");

However, the SqlDataAdapter does not have that overload and I can't
find any way to get a Recordset from the SqlDataAdapter.

aTdHvAaNnKcSe
-Scott Greenbaum
scott{at}glockfaq{dot}com
 
S

Scot Rose [MSFT]

You can load a recordset into a dataset using the method you found, however you cannot do the reverse. To get an ADO Recordset in .Net you will have to use ADO through COM
Interop...

Want to know more? Check out the MSDN Library at http://msdn.microsoft.com or the Microsoft Knowledge Base at http://support.microsoft.com

Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : (e-mail address removed) <Remove word online. from address>

This posting is provided “AS IS”, with no warranties, and confers no rights.




--------------------
 

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