Link to home
Start Free TrialLog in
Avatar of AHMA001
AHMA001Flag for United States of America

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.connection")
Conn.Open DB_CONN_STRING
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Nothing? Except if you changed the filename to test.accdb, and in that case UID and PWD is of no use, as user level security has been removed from Acess 2007 using the new fileformat.

/gustav
Avatar of AHMA001

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
Avatar of AHMA001

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
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AHMA001

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