Weebairnes
Programmer
I am working to convert a db from 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;"
OR
Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application.9"
appAccess.NewCurrentDatabase "C:\My Documents\Newdb.mdb"
Situation:
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. In fact, I don't know what DLL to use in the references so that my DB recognizes the statement
Dim Cat As New ADOX.Catalog
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;"
OR
Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application.9"
appAccess.NewCurrentDatabase "C:\My Documents\Newdb.mdb"
Situation:
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. In fact, I don't know what DLL to use in the references so that my DB recognizes the statement
Dim Cat As New ADOX.Catalog