Dim acat As New ADOX.Catalog()
Try
Dim sCreateString As String
sCreateString = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
"MyLibrary.mdb" 'you can give path also otherwise db will created in app folder
acat.Create(sCreateString)
Catch Excep As System.Runtime.InteropServices.COMException
MsgBox("DB Cannot be created")
Finally
cat = Nothing 'clean up is very important
End Try
0 Comments