[AccessD] VBA ADO Recordset question

Charlotte Foust cfoust at infostatsystems.com
Fri Jun 20 16:34:59 CDT 2008


And further, from a Microsoft .Net/Com Migration and Interoperability
article ...


The following sample code in C# demonstrates how to build an ADO .NET
dataset from an ADO recordset.

/*
declare dataset and adapter.
Assume for this sample that an ADODB.Recordset has been 
passed to us by some external code in the variable 'rs'
*/

DataSet myDataSet;
System.Data.OleDb.OleDbDataAdapter myDataAdapter;

myDataAdapter = new System.Data.OleDb.OleDbDataAdapter();
myDataSet  = new DataSet();

/*
 copies the contents of the ADODB.recordset rs into the 
ADO .NET dataset
*/
myDataAdapter.Fill(myDataSet, rs);

For a more complete example of translation between ADO and ADO .NET,
refer to the ASPXToADO sample in the .NET Framework SDK. If you install
the SDK to its default directory, the sample can be found at C:\Program
Files\Microsoft.NET\FrameworkSDK\Samples\Technologies\Interop\Basic\ASPX
ToADO.

Charlotte Foust
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte
Foust
Sent: Friday, 20 June 2008 2:30 p.m.
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] VBA ADO Recordset question

If you're working with a recordset object in ADO.Net, it's an ADO
Recordset being mapped to an ADO.Net dataset.  ADO uses a DataSet or a
DataAdapter, the latter of which allows you to specify behavior
performed implicitly by the Recordset in ADO.  The ADO.Net DataTable
object is the equivalent of an ADO disconnected recordset.  The
DataReader in .Net is similar to a forward-only, read-only recordset.  

 Charlotte Foust

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: Friday, 20 June 2008 10:54 a.m.
To: AccessD at databaseadvisors.com
Subject: [AccessD] VBA ADO Recordset question

When manipulating a Recordset object in ADO.NET, are you working with an
ADO.NET Recordset or an ADO Recordset?

There's no Recordset object in the ADO.NET Object Model, but I do see
Recordsets used in ADO.NET.

Susan H. 

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list