[thelist] ASP/ADO ConnectionString for SQL Server database

David Mitchell dave at dbmdata.com
Thu Oct 16 14:11:22 CDT 2003


Hi Sarah,

Fill in the correct parameters for the below connection string:

"Provider=SQLOLEDB;Data Source=server_name;
Database=database_name;UID=user_id;PWD=password;"

If you still get the same error message, then I would expect that the
username/password on the staging server is not valid. Open up the
Enterprise Manager, navigate to Security/Logins for the database and
make sure that the login exists and has access to the database you are
trying to connect to.

Dave

MortgagePro.ca - Now accepting online mortgage applications!
http://www.mortgagepro.ca




-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Sarah
Sent: Thursday, October 16, 2003 1:01 PM
To: Evolt - thelist
Subject: [thelist] ASP/ADO ConnectionString for SQL Server database


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

-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 



More information about the thelist mailing list