Putting a new datatable from VB to Access

Sibs

New member
Joined
Apr 30, 2003
Messages
1
I need to create a new datatable in my VB .net code and then when I have filled the datatable I want to send this to an empty Access table.

When I have looked at the books they all talk about doing a SELECT statement first which brings back the data already in the Access table. I dont want to do this. the table is created in the VB code.

Any ideas?
 
It sounds like you want to actually create a table that doesnt exist? Youll have to run a query that creates the table, such as "CREATE TABLE table1 (column1 int, column2 int)". I dont know the syntax for doing this in Access, youll have to check the help.

Its definitely NOT as simple as creating a table in code in a DataSet and having some built-in .NET objects create that table in Access for you. Youll have to run a script (the name for an SQL "query" that doesnt really query the database, but instead performs some action) as shown above.

-ner
 
Back
Top