Click to See Complete Forum and Search --> : Getting at ADO.NET DataSets


Stephen Crabb
12-10-2000, 09:21 AM
I want to play around with ADO.NET from within Visual Foxpro. Can anyone
tell me how I get at the ADO.NET 'Dataset' object programatically please. To
create an old type ADO recordset the command would be

oRecordSet = createobjecy("ADODB.RecordSet)

Stephen Crabb
12-12-2000, 06:22 AM
Found the reason why I could not create a dataset.

Basically the .NET Framework SDK samples need to be installed, then issuing
a command such as....

oObject = CREATEOBJECT("System.Data.DataSet") works

Don't know why having to install the Samples makes it work maybe someone out
there does....


"Stephen Crabb" <crabcom@post.pl> wrote in message
news:3a339282@news.devx.com...
> I want to play around with ADO.NET from within Visual Foxpro. Can anyone
> tell me how I get at the ADO.NET 'Dataset' object programatically please.
To
> create an old type ADO recordset the command would be
>
> oRecordSet = createobjecy("ADODB.RecordSet)
>
>
>

David Bayley
12-12-2000, 09:35 AM
Stephen,

I presume that VFP can only create COM objects, and so you need to use
..NET's COM Interop features to create a DataSet.

A .NET dll needs to be registered in the registry as COM classes before it
can be used by COM clients. This is done using the RegAsm.exe command line
utility.

I imagine the samples illustrate this, and therefore runs RegAsm on the
System.Data.dll (which contains the DataSet) during the install.

--
David.


Stephen Crabb <crabcom@post.pl> wrote in message
news:3a360ba7@news.devx.com...
> Found the reason why I could not create a dataset.
>
> Basically the .NET Framework SDK samples need to be installed, then
issuing
> a command such as....
>
> oObject = CREATEOBJECT("System.Data.DataSet") works
>
> Don't know why having to install the Samples makes it work maybe someone
out
> there does....
>
>
> "Stephen Crabb" <crabcom@post.pl> wrote in message
> news:3a339282@news.devx.com...
> > I want to play around with ADO.NET from within Visual Foxpro. Can anyone
> > tell me how I get at the ADO.NET 'Dataset' object programatically
please.
> To
> > create an old type ADO recordset the command would be
> >
> > oRecordSet = createobjecy("ADODB.RecordSet)
> >
> >
> >
>
>