Solved

Access 2007 dsn less connection string

Posted on 2008-06-25
7
1,874 Views
Last Modified: 2013-11-25
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
0
Comment
Question by:AHMA001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 50

Expert Comment

by:Gustav Brock
ID: 21872873
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
0
 

Author Comment

by:AHMA001
ID: 21880233
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.  
0
 
LVL 50

Expert Comment

by:Gustav Brock
ID: 21881358
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
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:AHMA001
ID: 21884051
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.
0
 
LVL 50

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 21884146
Yes, but that wizard is in 2007 - the frontend - and should work even if the backend - the file with your data - is in 2003.

If your database isn't split in a frontend and backend, a wizard to create that exists.

/gustav
0
 

Author Closing Comment

by:AHMA001
ID: 31470830
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.
0
 
LVL 50

Expert Comment

by:Gustav Brock
ID: 21889822
You are welcome!

/gustav
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question