Syntax Error with connection string connecting to Access 2007 database in ASP, please help

Hello,
I need help when using a connection string to connect to an access 2007 database within an ASP page.

I am using the string "Driver = {Microsoft Access Driver (*.mdb, *.accdb)};Dbq=(path to db);
Uid=Admin;Pwd=;"

When trying to load the page I get the error:

Microsoft VBScript compilation error '800a0408'

Invalid character

/PropertySearch.asp, line 7

ConnectionString= Driver = {Microsoft Access Driver (*.mdb,
*.accdb)};Dbq=C:\Users\Andy\Documents\Final_Project.accdb;

The error points to the "{" but everything tells me to use it.

1 answer

My best bet is that it is just a typo that you have omitted some " for the string.

Shouldn't:

ConnectionString= Driver = {Microsoft Access Driver (*.mdb, *.accdb)};Dbq=C:\Users\Andy\Documents\Final_Project.accdb;

really be:

ConnectionString= "Driver = {Microsoft Access Driver (*.mdb, *.accdb)};Dbq=C:\Users\Andy\Documents\Final_Project.accdb;"