Help with ADO .NET and Access

A

arguila

Hi,

I was wondering if somebody can give me an advice.

My problem is that I am working with an Access database, I am
succesfully running a query, binding the output of the query to the
data adapter to a dataset and to a table, then I add 4 new collumns
to the table and populate them, I am able to display all the collumns
in a datagrid, but now I cannot save this modified table back to the
Access file ( I want to save it as new table).

I have tried the "SELECT INTO" pair ; I tried the Update method of the
data adapter but then I found out that is not appropiate for what I
want, I tried also with an OleDBCommand but nothing.

Perhaps I am missing some sintax or concept or may be is just my lack
of experience with ADO .NET, but if somebody knows how to save back a
DataTable into an Access file I will appreciate any sort of input.

Thanks a lot in advance
Regards
 
V

Val Mazur

Hi,

You cannot use SELECT INTO, because there is no select from other table. You
cannot use SELECT INTO from the DataTable. Basically you need to accomplish
it in two steps. First create table and then prepare InsertCommand to
transfer data into database.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top