Connection Problem

I

Istari

Hi all

I've made a local copy of a client website (Pages and DB). I'm running XP
Pro and SQL 2000

They make use of global.asa to establish the connection and the details on
the live site were as follows:

<SCRIPT LANGUAGE="VBScript" RUNAT="Server">



Sub Application_OnStart

Application("connStr") = "Provider=sqloledb;" & _
"Data Source=SERVERIP" & _
"Initial Catalog=databasename;" & _
"User Id=username;" & _
"Password=password"
End Sub
</SCRIPT>

I put my local DB Server in Data Source and my local copy can be accessed
using a DSN. However, when trying to run the website I get the following
error:

Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access
denied.
/churchillmurray.co.za/include/commonFunctions.asp, line 25

That line of code where the error occurs looks as follows:
objConn.Open Application("connStr")

The site is in a virtual directory in IIS

Can anyone help me in making the connection?
 
I

Istari

Hi, My mistake. That was a typo when I was typing the post. The actual info
doesn't have the semi colon
 
A

Aaron [SQL Server MVP]

Hi, My mistake. That was a typo when I was typing the post. The actual
info
doesn't have the semi colon

That's my point, it needs one. If you print the string out, you'll see why:

....Data Source=SERVERIPInitial Catalog=databasename;...

I'm guessing you don't have a server called "SERVERIPInitial
Catalog=databasename" ...
 
B

Bob Barrows [MVP]

Well it should. All the attributes in the connection string should be
separated by simicolons.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top