Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about System DSN

Status
Not open for further replies.

Gatorajc

MIS
Mar 1, 2002
423
US
How come this is not working?

Set Conn = Server.CreateObject( "ADODB.Connection" )
Conn.ConnectionString = "DSN=Cust.dsn"
Conn.Open

If I am using a System DSN this should be all I have to do right? This is connecting to an Access DB on the web server. And yes I checked to 3x to make sure it is pointed to the right data source.

I am use to using a System DSN to connect to a SQL Server and its really easy but this seems to be giving me a problem. AJ
I would lose my head if it wasn't attached. [roll1]
 
Just make sure that you do not have the Access DB open on your machine.. (ie Close MS ACCESS)

I used to have this problem too.. Since SQL Server is a server based software, it allows multiple connections.. With Access, you can only have one open connection and all other attempts are locked out.

Hope this solves your problem.

Gorkem.
 
Yea I had the problem before also. It is not open. It should be working correct? AJ
I would lose my head if it wasn't attached. [roll1]
 
Hmmm...

I've never had trouble with multiple connections to an MS Access DB. I've kept the Access DB open and run a program that initiates a connection (DSN-less or with a DSN, it doesn't matter) to the same database. I've even had multiple copies of that program open with no problems querying and updating the database.
 
Well the problem is that it does not see it. It says data source not found. AJ
I would lose my head if it wasn't attached. [roll1]
 
What is the name of your System DSN? Is it named Cust?

Your connection string says "DSN=Cust.dsn". System DSN's aren't files. They are stored in the registry. If your DSN is named cust then your connection string should say "DSN=Cust".
 
Yes the SYstem DSN name is Cust as well. AJ
I would lose my head if it wasn't attached. [roll1]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top