Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Connection Problem

Reply
Thread Tools

Connection Problem

 
 
Istari
Guest
Posts: n/a
 
      10-08-2004
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?



 
Reply With Quote
 
 
 
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      10-08-2004
> "Data Source=SERVERIP" & _
> "Initial Catalog=databasename;" & _


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


 
Reply With Quote
 
 
 
 
Istari
Guest
Posts: n/a
 
      10-08-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 ?
>
>
>

 
Reply With Quote
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      10-08-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.)


 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      10-08-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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No "Wireless Network Connection" available in network connection =?Utf-8?B?am9raW5kYTE=?= Wireless Networking 7 10-16-2012 07:32 AM
Internet connection but no workgroup connection =?Utf-8?B?am9uX2p3Yg==?= Wireless Networking 2 11-28-2005 09:46 PM
ICS works with wired connection, fails with wireless connection Rich Wireless Networking 0 11-16-2005 06:48 PM
Wireless Connection drops / PS2 connection Steve Wireless Networking 1 07-27-2005 01:27 PM
Not seeing Wireless Connection in Network Connection =?Utf-8?B?bW90b21hbm1hdHQ=?= Wireless Networking 4 03-05-2005 04:39 AM



Advertisments
 



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