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
edit delete
are you sure?
asked Andrew Earley

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;"
0
edit delete
are you sure?
answered Richard Honnenheim

Post an answer but please log in first

Post Answer
  1. Please log in to post answer

Similar Questions

Tagsfor this question

Forumall questions