How to Delete Table in .mdb through VB?

r_stich
02-11-2003, 03:36 PM
Ok, I have Visual Studio 6 Proffesional (which doesn't come with the Database designer) and Office 2000 without Access.

I've got an existing mdb database that I want to plug into..., I've already established the Visual Connections using the Data Tool and have formulated some queries, etc.
I'm having lots of questions and even more headaches...

the most burning question is: how can I delete a table from the mdb database? (While experimenting, I formed a "make new table" SQL query and ran it. Now the horrible results of my experiment are there to haunt me). I would prefer to be able to do this programmatically, ie: check if table exists, if not, add table...

2) If the database is .mdb, does that mean it is definitely a Jet database? Seeing that Jet has been deprecated, I wonder if there is a better way to connect to it? (again, under my Data Environment, I have connected to it using Jet 4.x or something

3)The ADO object model doesn't have things like Tables, Queries, procedures, etc. Am I missing something? Is it possible to access an existing Table, add Fields, modify records, etc?

hmmm, I have lots of questions but a gentle nudge in the correct direction for any of these would be a tremendous head start. I've looked at MSDN online, the Visual Studio MSDL, etc, but can't seem to get a clear picture of how things should work. This is a small, home-oriented project application, so the networking and database structures are all fairly simple, I'm not worried about security and stuff...

Thanks in advance for any pointers,
Stick

Flyguy
02-11-2003, 04:34 PM
Use ADOX for creating/modifyin the DB and Tables
Make a reference to "Microsoft ADO Ext. 2.x for DDL and Security"

To get rid of a table you can also use plain SQL by isueing the "DROP TABLE"

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum