saving dataset to mdb

  • Thread starter Thread starter curtis m. west
  • Start date Start date
C

curtis m. west

hello ng

i'm new to vb.net and start working with datasets. now i have the following
problem: how do i get a table (or multiple tables) from a dataset saved to
an mdb-file?

searching thru the web i found the ".fill-method" for filling the dataset
with the data from an mdb-file - but no clue how to do it "the other way
round".

tnx for any help
greetz, curtis
 
The update method of the dataadapter. You'll need to either use the
Configuration wizard (drag an adapter component onto your form, make sure
your table has a key on it and it pretty much walks you through the rest),
use a CommandBuilder (highly discouraged but you can check it out by
googling on CommandBuilder) or write your own.

The datadapter will need an insert/delete and update command if it's going
to perform any of those tasks, which all may get called when you call the
update method of the dataadapter. Remember, the command it chooses to use
is based on the rowstate of the row, Added will cause an Insert, Modified
will cause an Update, Deleted will cauase a Delete

HTH,

BIll
 
thank you very much for the fast answer!
the problem: those table(s) do not exist in the mdb yet...

something like executing a command-object (containing an sql "create table")
on the connection-object?

tnx for any help
greetz, curtis
 
Hi Curtis,

I was thinking a little bit that you was going that way, however that was
not sure in your question. And there is no automatic function, so it is for
me obvious why Bill answered it in this way.

You have to use SQL CREATE TABLE statements to create the tables, where I
now sustpect that the mdb file exist.

I hope this helps?

Cor
 
Like Cor mentions, if those tables don't exist, they are going to have to be
made / the easiest way is with a DDL statement.
 
Back
Top