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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating Access tables form visual basic

Status
Not open for further replies.

ganusha

Programmer
May 1, 2002
28
US
Hi

I'm creating a table in access dynamically in visual basic.
When i run the vbp, it creates the table successfully but when i run the exe i does not.
Whenever i open the table in access, it gives me an error message saying:

"The database was created in an earlier version of Access. You don't have appropriate security permissions to open or convert databases created in earlier versions."

Can anyone help me on this.
 
Not sure what the syntax is in VB, but when creating a database from Access, you would specify the database version - Example:

Set dbsNew = DBEngine.Workspaces(0).CreateDatabase(NewDBName, dbLangGeneral, dbVersion30)

where dbVersion30 would be specifying a 97 database
 
i'm using adox to connect to the database

Set catDB = New ADOX.Catalog
' Open the catalog.

catDB.ActiveConnection=
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & lsDatasource & ";Persist Security Info=False"

The database was initially created in access 97 and when i open the database in access and then convert it to the latest version and then run my exe it does create the new table without any problem.
i.e the exe works with the converted database but not with access 97.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top