Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete mdb database via code? 1

Status
Not open for further replies.

FinalPrime

Technical User
Jul 28, 2003
50
US
to all:
How do I delete a mdb database via code?
My function below works great for creating one,
but I'm stuck writing my delete function.

help appreciated.
finalprime

Function CreateAccessDatabase(sDatabaseToCreate) As String
Dim oCatalog
Dim catNewDB As Database
Set catNewDB = Nothing
Set oCatalog = CreateObject("ADOX.Catalog")
sDatabaseToCreate = sDatabaseToCreate & ".mdb"
oCatalog.Create "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sDatabaseToCreate
Set oCatalog = Nothing
End Function
 
Have a look at the KILL command. Seriously, thats' what its called :)

Hope this helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top