I give up. I've looked for 2 hours now,
how do you create a new database (not a table) in ADO?
Printable View
I give up. I've looked for 2 hours now,
how do you create a new database (not a table) in ADO?
Public Function MakeJetDB(strDBPathName As String) _
As Boolean
Dim objCat As ADOX.Catalog
'Create new Catalog object
Set objCat = New ADOX.Catalog
'Use the Create method to create a new database
objCat.Create "Provider=Microsft.Jet.OLEDB.4.0;" & _
"Data Source=" & strDBPathName
End Function
from
http://www.wiley.com/legacy/compbooks/press/march4.html
Ok, than didn't work. Using the following code:
Public Sub MakeJetDB(strDBPathName As String)
Dim objCat As ADOX.Catalog
Set objCat = New ADOX.Catalog
objCat.Create "Provider=Microsft.Jet.OLEDB.4.0;" & _
"Data Source=" & strDBPathName
Xit_MakeJetDB:
On Error GoTo 0
End Sub
I get the error: class is not registered.
I have a reference to MS ADO Ext. 2.5 for DDL and Security
strDBPathName= "C:\xxx.mdb" ---> doesn't exist.
Any ideas?