Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jet / db version?

Status
Not open for further replies.

JonJacobik

Technical User
Dec 9, 2001
27
0
0
US
I've been using this line to create a new database in my software. It creates a database using Access '97 /Jet 3.5
format.

Set plist = CreateDatabase(filename, dbLangGeneral, dbVersion30)

What do I need to do to update my database to 2002, 2000, Jet 4?

 
Add a referece to Microsoft ADO Ext. 2.7 to your project

Then use the following code

Code:
    If Dir("C:\Test2.mdb") = "" Then 'If the file is not there
        Set cat = New ADOX.Catalog
        cat.Create "Provider=Microsoft.Jet.OLEDB.4.0;" & _
              "Data Source=C:\Test2.mdb;" & _
              "Jet OLEDB:Engine Type=5;"
        Set cat = Nothing
    End If

Set Cat = Nothing 'Release the reference to the .mdb
 
Thanks but . . .

I get an error when the code executes - meaningless, it reads

Error -2147467259

 
What line does the error occur on? Is there any message besides the number?
 
After some additional testing, I see that your code works perfectly. Now I need to work through the process of adding tables, etc. It looks like a major job to get it all together. Seems one of my tabledefs coincidentily was called "CAT" and there was a bit of a conflict when I first tried it.

Thanks again.

Jon
 
You caould have also done this:

Set plist = CreateDatabase(filename, dbLangGeneral, dbVersion40)

(You need to change the DAO reference from 3.5x to 3.6)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top