Hi,
I want to be able to create and delete a database with some tables dynamically through my VB program.
I am using this code to create a database
Is there a way to completly delete an existing database.
I want to be able to create and delete a database with some tables dynamically through my VB program.
I am using this code to create a database
Code:
Dim DataDir As String
Dim ws As Object
Dim db As Object
DataDir = App.Path & "\Client.mdb"
Set ws = DBEngine.Workspaces(0)
Set db = ws.OpenDatabase(DataDir)
Set db = ws.CreateDatabase(DataDir, dbLangGeneral)
Set admintbl = db.CreateTableDef("Config")
Set fld = admintbl.CreateField("AdminPwd", dbText, 20)
admintbl.Fields.Append fld
Set fld = admintbl.CreateField("Wallpaper", dbText, 220)
admintbl.Fields.Append fld
db.TableDefs.Append admintbl