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?

Re: Connection Problem by Aaron

Aaron
Fri Oct 08 09:57:44 CDT 2004

> "Data Source=SERVERIP" & _
> "Initial Catalog=databasename;" & _

Uh, did you mean to have a semi-colon after SERVERIP ?



Re: Connection Problem by istari_6

istari_6
Fri Oct 08 10:11:02 CDT 2004

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

"Aaron [SQL Server MVP]" wrote:

> > "Data Source=SERVERIP" & _
> > "Initial Catalog=databasename;" & _
>
> Uh, dide you mean to have a semi-colon after SERVERIP ?
>
>
>

Re: Connection Problem by Aaron

Aaron
Fri Oct 08 10:41:37 CDT 2004

> 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" ...

--
http://www.aspfaq.com/
(Reverse address to reply.)



Re: Connection Problem by Bob

Bob
Fri Oct 08 10:45:27 CDT 2004

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

Istari wrote:
> Hi, My mistake. That was a typo when I was typing the post. The
> actual info doesn't have the semi colon3
>
> "Aaron [SQL Server MVP]" wrote:
>
>>> "Data Source=SERVERIP" & _
>>> "Initial Catalog=databasename;" & _
>>
>> Uh, dide you mean to have a semi-colon after SERVERIP ?

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.