Unanswered: Create database from VB with ADO
Still working to convert DAO to ADO...
How do I make a database with some ADO method?
If I understand correctly, I have two options for making a database.
Dim cat As New ADOX.Catalog
cat.Create "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=.\New.mdb;"
Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application.9")
appAccess.NewCurrentDatabase "C:\My Documents\Newdb.mdb"
I have a audit trail table that grows quickly. So, after so many thousands of records, the code exports this table it to a 'backup' database and cleans out the current audit trail record. All that works peachy. In the event that the backup database isn't present - I need to create it. That's my goal: simply create a new db with ADO. Then the code will export the table.
1) Is one method better than the other?
2) I don't understand the parameters in the cat.Create method.
This is the day the Lord has made, I will rejoice and be glad in it.