|
-
Apr 27th, 2004, 02:50 PM
#1
Thread Starter
Lively Member
[RESOLVED] Delete tables from database programatically
hy there ,
i have a database with numerous tables and i need to make a copy of it, then delete the tables i don't need, leaving only one table in the copied file.
is this possible ? modifying the .mdb structure through vb.net?
i need this so that i can export data from one table only in a single file, and the other tables are just taking up space (the whole database has 6 mb when it is empty and is not very portable.)
i could store a database containing only my desired table with the program files for this purpose only, but i was wondering if there is another way as i don't like this solution.
any ideeas ?
Last edited by mindloop; Apr 27th, 2004 at 03:30 PM.
ehmm...
-
Apr 27th, 2004, 03:08 PM
#2
Addicted Member
VB Code:
cnNew.Open()
cmd = New OleDbCommand("DROP Table TABLE_NAME", cnNew)
Try
cmd.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.Message)
End Try
-
Apr 27th, 2004, 03:29 PM
#3
Thread Starter
Lively Member
thanks i guess that will do, didn't expect it to be as simple.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|