Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 30th, 2004, 02:07 AM
Registered User
 
Join Date: Feb 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with connection to db at webserver

Hi.

I have just installed my webapplication on my ISP`s webserver with a connection to a SQL Server on the same server. My problem is that my app. cant find the database from the webserver. When I make a connection to the same db from my application running on my machine locally there is no problem. However, when i try to run the application on the webserver I get an error like this: SQL Server not found or access denied. When the remote db connection works from my machine, why doesn`t it work from tha webserver where the db is located. I use the same connection string:

"data source=gryllefjord.chriskomm.no;initial catalog=felicitas_new;persist security info=False;user id=myId;password:myPass;packet size=4096"

Can someone please help me?


Thanks!

Regards,
Knut

 
Old April 30th, 2004, 03:12 PM
Authorized User
 
Join Date: Apr 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think in your connection string the password field should be 'password=myPass;' not 'password:myPass;'

Good luck!

Qadeer

 
Old May 1st, 2004, 04:01 AM
Registered User
 
Join Date: Feb 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, In the connection string i use it`s: password=myPass
I typed the semicolon instead when i posted the message. :)
Any other suggestions?

Thanks.
Knut

 
Old May 24th, 2004, 07:59 AM
Authorized User
 
Join Date: Jun 2003
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if the webserver and the sql server are on the same machine, you don't need to specify the fullname of the server in the connection string; you can specify only "." (a single dot) like this:

"data source=.;initial catalog=felicitas_new;persist security info=False;user id=myId;password:myPass;packet size=4096"

the use of the dot instead of the server name, is, i think, a feature of the ole db client.

you can also replace the server name with "localhost" like this:

"data source=localhost;initial catalog=felicitas_new;persist security info=False;user id=myId;password:myPass;packet size=4096"

this is because (allmost) all computers using TCP/TP, have the "localhost" name asociated with the 127.0.0.1 ip address. (in the %windir%\system32\drivers\etc\hosts file).

instead of the dot or "localhost", you could also try using "127.0.0.1" (the loopback ip address).

maybe one of the above ways will work.

defiant.





Similar Threads
Thread Thread Starter Forum Replies Last Post
DB Connection Problem kingroon Classic ASP Databases 1 May 17th, 2006 01:49 AM
problem with publishing to a webserver JRMotz BOOK: ASP.NET Website Programming Problem-Design-Solution 0 April 17th, 2006 09:58 PM
Problem with IIS webserver hawkfb63 ASP.NET 2.0 Professional 1 March 6th, 2006 12:53 AM
db connection dfeuerborn Excel VBA 1 August 19th, 2005 02:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.