Help with ADO .NET and Access

  • Thread starter Thread starter arguila
  • Start date Start date
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
 
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.
 
Back
Top