Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Connection Problem (http://www.velocityreviews.com/forums/t796658-connection-problem.html)

Istari 10-08-2004 02:53 PM

Connection Problem
 
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?




Aaron [SQL Server MVP] 10-08-2004 02:57 PM

Re: Connection Problem
 
> "Data Source=SERVERIP" & _
> "Initial Catalog=databasename;" & _


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



Istari 10-08-2004 03:11 PM

Re: Connection Problem
 
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 ?
>
>
>


Aaron [SQL Server MVP] 10-08-2004 03:41 PM

Re: Connection Problem
 
> 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.)



Bob Barrows [MVP] 10-08-2004 03:45 PM

Re: Connection Problem
 
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.




All times are GMT. The time now is 10:31 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57