[thelist] ASP/ADO ConnectionString for SQL Server database

Sarah poohbear at designshift.com
Thu Oct 16 12:01:00 CDT 2003


Hello, All!

I have been plugging away at ASP for a couple of weeks now, and I seem to 
be catching on somewhat :) I've been using my workstation as a development 
platform for the site I'm working on, and I've managed to retrieve data 
from the database, display it on the site, and even edit it. Now a staging 
server has been set up for the client to preview the site, but I can't get 
the ADO ConnectionString to work. Both sites are hosted on Windows 2000 
machines. Mine is using SQL Server 7, the staging server is using SQL 
Server 2000.

On my own computer, I had set up a System DSN, and used the following as a 
ConnectionString:

   Provider=MSDASQL; DSN=myDSN; UID=myUsername; PWD=myPassword;

When I copied the site to the staging server, I tried just changing the 
username and password (the DSN has the same name on the staging server). 
This is the error message I got with that ConnectionString:

   Microsoft OLE DB Provider for SQL Server (0x80004005)
   [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or 
access denied.

So I did some searching for information on the ADO ConnectionString, and 
tried this (and got the same error message):

   Provider=sqloledb;Network Library=DBMSSOCN;Data 
Source=xxx.xxx.xxx.xxx,1433;Initial Catalog=myDatabase;User 
ID=myUsername;Password=myPassword;

Does anyone have a suggestion of a different ConnectionString I can try? 
Also, any insight on why ConnectionString has so many different variations 
would be helpful. So far this is the most confusing aspect of ASP I've had 
to deal with.

TIA,

Sarah



More information about the thelist mailing list