Hi

Can anybody tell me the easiest way in ADO.NET to copy a table from one
Access database to another Access Database?

Some example code would be useful.

Thanks in advance

Geoff

Re: Copying a table from one database to another by Cor

Cor
Thu Oct 21 05:08:06 CDT 2004

Geoff,

The content or the complete table including the schema (what is not direct
possible)

Cor

"Geoff Jones" <geoff@NODAMNSPAM.com>

> Hi
>
> Can anybody tell me the easiest way in ADO.NET to copy a table from one
> Access database to another Access Database?
>
> Some example code would be useful.
>
> Thanks in advance
>
> Geoff
>
>



Re: Copying a table from one database to another by Geoff

Geoff
Thu Oct 21 05:14:16 CDT 2004

Hi Cor

The content; although wouldn't this implicitly include the schema as well?
That is, I want to make an exact copy of the table in the other database
file.

Geoff

P.S. I don't understand what you mean by "what is not direct possible"

"Cor Ligthert" <notmyfirstname@planet.nl> wrote in message
news:ug7DfW1tEHA.2072@tk2msftngp13.phx.gbl...
> Geoff,
>
> The content or the complete table including the schema (what is not direct
> possible)
>
> Cor
>
> "Geoff Jones" <geoff@NODAMNSPAM.com>
>
> > Hi
> >
> > Can anybody tell me the easiest way in ADO.NET to copy a table from one
> > Access database to another Access Database?
> >
> > Some example code would be useful.
> >
> > Thanks in advance
> >
> > Geoff
> >
> >
>
>



Re: Copying a table from one database to another by Cor

Cor
Thu Oct 21 05:52:04 CDT 2004

Geoff,

It is not directly possible to create a database table from a dataset. You
can of course try to create your own routine, for building a SQL Create
string using the schema in the dataset.

And than when you have it and made generic, send it to this newsgroup,
because there is often asked for.

You can copy a datatable by setting first when you do the fill the option
with the dataadapter the acceptchangesduringfill to false

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatacommondataadapterclassacceptchangesduringfilltopic.asp

Than you can update it to an other database with the same (or almost same)
schema.

When you want to use the commandbuilder you can use the fillschema first.

I hope this gives some ideas

Cor

"Geoff Jones"
..
> Hi Cor
>
> The content; although wouldn't this implicitly include the schema as well?
> That is, I want to make an exact copy of the table in the other database
> file.
>
> Geoff
>
> P.S. I don't understand what you mean by "what is not direct possible"
>
> "Cor Ligthert" <notmyfirstname@planet.nl> wrote in message
> news:ug7DfW1tEHA.2072@tk2msftngp13.phx.gbl...
>> Geoff,
>>
>> The content or the complete table including the schema (what is not
>> direct
>> possible)
>>
>> Cor
>>
>> "Geoff Jones" <geoff@NODAMNSPAM.com>
>>
>> > Hi
>> >
>> > Can anybody tell me the easiest way in ADO.NET to copy a table from one
>> > Access database to another Access Database?
>> >
>> > Some example code would be useful.
>> >
>> > Thanks in advance
>> >
>> > Geoff
>> >
>> >
>>
>>
>
>