Home All Groups Group Topic Archive Search About

Saving a data table to a MS Access database

Author
3 May 2006 2:01 AM
Mark
Hi -

I've a data table that I want to save to an external Access database.

I'm interested in sample code that would perform this save.

Thanks, Mark
(VB.NET, .Net framework 1.0)

Author
3 May 2006 5:08 AM
Cor Ligthert [MVP]
Mark,

From where did you get your datatable?

You cannot create from a hand made datatable a database. This is maybe an
option for a next version from Visual Studio Net.

Cor

Show quoteHide quote
"Mark" <M***@discussions.microsoft.com> schreef in bericht
news:0C65E085-CE7E-46DD-A452-83018DDCB1FD@microsoft.com...
> Hi -
>
> I've a data table that I want to save to an external Access database.
>
> I'm interested in sample code that would perform this save.
>
> Thanks, Mark
> (VB.NET, .Net framework 1.0)
Author
3 May 2006 12:11 PM
Mark
Cor -

The program populates a datatable from a connection to an Excel workbook. 

It's in a loop, with each iteration the workbook is opened, calculates the
result, and the result is saved in a datatable residing in the VB program.

When the loop is done I want to save the datatable to an External Access
Database for use in other apps.

Thanks,
Mark

Show quoteHide quote
"Cor Ligthert [MVP]" wrote:

> Mark,
>
> From where did you get your datatable?
>
> You cannot create from a hand made datatable a database. This is maybe an
> option for a next version from Visual Studio Net.
>
> Cor
>
> "Mark" <M***@discussions.microsoft.com> schreef in bericht
> news:0C65E085-CE7E-46DD-A452-83018DDCB1FD@microsoft.com...
> > Hi -
> >
> > I've a data table that I want to save to an external Access database.
> >
> > I'm interested in sample code that would perform this save.
> >
> > Thanks, Mark
> > (VB.NET, .Net framework 1.0)
>
>
>
Author
3 May 2006 9:29 PM
AMDRIT
You can issue DDL statements to Access like you would in SQL.

Take a look at
http://www.personal.kent.edu/~gthomas/sql/sqldoc.htm



Show quoteHide quote
"Mark" <M***@discussions.microsoft.com> wrote in message
news:EF48D7A5-B78C-41B5-81E3-F0A16AED52F3@microsoft.com...
> Cor -
>
> The program populates a datatable from a connection to an Excel workbook.
>
> It's in a loop, with each iteration the workbook is opened, calculates the
> result, and the result is saved in a datatable residing in the VB program.
>
> When the loop is done I want to save the datatable to an External Access
> Database for use in other apps.
>
> Thanks,
> Mark
>
> "Cor Ligthert [MVP]" wrote:
>
>> Mark,
>>
>> From where did you get your datatable?
>>
>> You cannot create from a hand made datatable a database. This is maybe an
>> option for a next version from Visual Studio Net.
>>
>> Cor
>>
>> "Mark" <M***@discussions.microsoft.com> schreef in bericht
>> news:0C65E085-CE7E-46DD-A452-83018DDCB1FD@microsoft.com...
>> > Hi -
>> >
>> > I've a data table that I want to save to an external Access database.
>> >
>> > I'm interested in sample code that would perform this save.
>> >
>> > Thanks, Mark
>> > (VB.NET, .Net framework 1.0)
>>
>>
>>
Author
3 May 2006 11:53 PM
Dennis
Why don't you create your DataBase with the appropriate blank table
containing all the fields you want.  You can then fill a dataset with the
blank datatable from the database, update your dataset then when finished,
update the datatable in the database.
--
Dennis in Houston


Show quoteHide quote
"Mark" wrote:

> Cor -
>
> The program populates a datatable from a connection to an Excel workbook. 
>
> It's in a loop, with each iteration the workbook is opened, calculates the
> result, and the result is saved in a datatable residing in the VB program.
>
> When the loop is done I want to save the datatable to an External Access
> Database for use in other apps.
>
> Thanks,
> Mark
>
> "Cor Ligthert [MVP]" wrote:
>
> > Mark,
> >
> > From where did you get your datatable?
> >
> > You cannot create from a hand made datatable a database. This is maybe an
> > option for a next version from Visual Studio Net.
> >
> > Cor
> >
> > "Mark" <M***@discussions.microsoft.com> schreef in bericht
> > news:0C65E085-CE7E-46DD-A452-83018DDCB1FD@microsoft.com...
> > > Hi -
> > >
> > > I've a data table that I want to save to an external Access database.
> > >
> > > I'm interested in sample code that would perform this save.
> > >
> > > Thanks, Mark
> > > (VB.NET, .Net framework 1.0)
> >
> >
> >