AHMA001
asked on
Access 2007 dsn less connection string
I have an access 2003 database that has been converted to 2007. How do I modify my dsn less connection string so that my asp pages can read the new file? My current code is
DB_CONN_STRING = "Driver={Microsoft Access Driver (*.mdb)};"
DB_CONN_STRING = DB_CONN_STRING + "Dbq=d:\webs\data\test.mdb ;"
DB_CONN_STRING = DB_CONN_STRING + "Uid=Admin;"
DB_CONN_STRING = DB_CONN_STRING + "Pwd=;"
'------------------------- ---------- ---------- ---------- ---------- -------
set Conn = server.CreateObject("adodb .connectio n")
Conn.Open DB_CONN_STRING
DB_CONN_STRING = "Driver={Microsoft Access Driver (*.mdb)};"
DB_CONN_STRING = DB_CONN_STRING + "Dbq=d:\webs\data\test.mdb
DB_CONN_STRING = DB_CONN_STRING + "Uid=Admin;"
DB_CONN_STRING = DB_CONN_STRING + "Pwd=;"
'-------------------------
set Conn = server.CreateObject("adodb
Conn.Open DB_CONN_STRING
ASKER
I've tried this and I get a variety of errors, depending on how I tweak it. Either a resource not found or some generic microsoft error message that appears to be similar to one where the file does not have permissions. I have confirmed the file is there and if I put a new file out it the directory that is Access 2003 it works fine.
But do you really need to convert this file? Access 2007 works nicely with a 2003 file (mdb). And I doubt very much that your ASP pages will see any advantages changing the database file to accdb type.
/gustav
/gustav
ASKER
Actually, yes I do. Access 2007 has data import wizards that I want to use so that my user can do a two clicks and your done process to update the data on-line.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sometimes it takes someone further away from the problem to see outside the box. I never thought to put the data in a 2003 mdb and the wizard in a 2007 accdb. That solved my problem. Thank you very much.
You are welcome!
/gustav
/gustav
/gustav