Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 don't want to do this. the table is created in the VB code.

 

Any ideas?

  • *Experts*
Posted

It sounds like you want to actually create a table that doesn't exist? You'll have to run a query that creates the table, such as "CREATE TABLE table1 (column1 int, column2 int)". I don't know the syntax for doing this in Access, you'll have to check the help.

 

It's 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. You'll have to run a script (the name for an SQL "query" that doesn't really query the database, but instead performs some action) as shown above.

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...