By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,184 Members | 1,500 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,184 IT Pros & Developers. It's quick & easy.

VBNET2005 : Manipulating MS Access tabledefinitions in VB.NET -> Create, Copy and Drop Table.

P: n/a
Hi,

I have an Access MDB database with a Table1.
From VBNET I would like to CREATE a NEW table, which is a copy of Table1,
but not with the Data, only the definition.
I would also like to have the possibility to DROP a table in that Database.

--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
-------------------------------------------------
Oct 17 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Do some searches in the comp.databases.ms-access newsgroup for "create
tables." After you have some sample code just add a reference to access
and .Net and you should be set.

Thanks,

Seth Rowe
Screaming Eagles 101 wrote:
Hi,

I have an Access MDB database with a Table1.
From VBNET I would like to CREATE a NEW table, which is a copy of Table1,
but not with the Data, only the definition.
I would also like to have the possibility to DROP a table in that Database.

--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
-------------------------------------------------
Oct 17 '06 #2

P: n/a
DK
Try something like this:

Select * INTO Table2 from Table1 where 1 = 2
Screaming Eagles 101 wrote:
Hi,

I have an Access MDB database with a Table1.
From VBNET I would like to CREATE a NEW table, which is a copy of Table1,
but not with the Data, only the definition.
I would also like to have the possibility to DROP a table in that Database.

--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
-------------------------------------------------
Oct 26 '06 #3

P: n/a
Access as database backend is considered obsolete , so i guess that ADOX
is never going to be ported to ADO.NET

so i guess you only have 2 options

option 1

Set a reference to Adox and use it with COM interop to manipulate an Access
database

option 2

Use DDL SQL on a command object

regards

Michel Posseth [MCP]

" Screaming Eagles 101" <se*********@online.pleaseschreef in bericht
news:Kd******************************@scarlet.biz. ..
Hi,

I have an Access MDB database with a Table1.
From VBNET I would like to CREATE a NEW table, which is a copy of Table1,
but not with the Data, only the definition.
I would also like to have the possibility to DROP a table in that
Database.

--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
-------------------------------------------------


Nov 12 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.