IDbDataAdapter and Fill

IDbDataAdapter and Fill

am 22.04.2008 23:22:27 von david

Hi,

Using .NET 1.1, C#

I am using a provider factory so that my app can use various database types.

I am currently using the DataAdapter from the provider to fill a dataset,
however, I would prefer to just populate a datatable. However, when I try to
fill my DataTable, I get

The best overloaded method match for
'System.Data.IDataAdapter.Fill(System.Data.DataSet)' has some invalid
arguments
and
Argument '1': cannot convert from 'System.Data.DataTable' to
'System.Data.DataSet'


Using the IDbDataAdapter, how can I fill a datatable, or am I stuck with a
dataset?

(I would prefer to use DataTable because they are not as resource hungry).

Thanks for any help you can offer.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available

RE: IDbDataAdapter and Fill

am 23.04.2008 02:56:01 von pbromberg

Resource- wise, there isn't that much difference between a DataSet containing
a single DataTable and a plain DataTable. I wouldn't sweat it.
-- Peter
To be a success, arm yourself with the tools you need and learn how to use
them.

Site: http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://ittyurl.net


"David" wrote:

> Hi,
>
> Using .NET 1.1, C#
>
> I am using a provider factory so that my app can use various database types.
>
> I am currently using the DataAdapter from the provider to fill a dataset,
> however, I would prefer to just populate a datatable. However, when I try to
> fill my DataTable, I get
>
> The best overloaded method match for
> 'System.Data.IDataAdapter.Fill(System.Data.DataSet)' has some invalid
> arguments
> and
> Argument '1': cannot convert from 'System.Data.DataTable' to
> 'System.Data.DataSet'
>
>
> Using the IDbDataAdapter, how can I fill a datatable, or am I stuck with a
> dataset?
>
> (I would prefer to use DataTable because they are not as resource hungry).
>
> Thanks for any help you can offer.
>
> --
> Best regards,
> Dave Colliver.
> http://www.AshfieldFOCUS.com
> ~~
> http://www.FOCUSPortals.com - Local franchises available
>
>
>