This is a discussion on "Remote vs Local" within the Classic ASP section. This forum, and the thread "Remote vs Local are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Remote vs Local
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Remote vs Local
Hi, I'm relatively new to ASP programming and I have a problem that has got me stumped.
It is accessing a database held on a remote server. It works from my colleagues local IIS, and on the remote server itself but it won't work from my local IIS. Does anyone know what could be causing this? Here's the code, but I don't think that will be the problem since it does work from some servers. <body> <% Connection_05 = "Provider=SQLOLEDB;Data Source=xxx;Initial Catalog=ContactForm;User Id=xxx;Password=xxx;Connect Timeout=15;" SQL_ContactForm = "SELECT * FROM ContactForm Where 1=1 " Set rs_ContactForm = Server.CreateObject("ADODB.Recordset") rs_ContactForm.Open SQL_ContactForm, Connection_05,1,3 Response.Write rs_ContactForm("SName") %> </body> |
|
|
|
#2
|
|||
|
|||
|
the code seems fine to me....
could you have set up iis wrong? |
|
#3
|
|||
|
|||
|
That's a possibilty. I'm new to this and my boss isn't that helpful. I'll try and look into it. Thanks.
|
|
#4
|
|||
|
|||
|
What error do you get when it tries to connect?
|
|
#5
|
|||
|
|||
|
The error is
Microsoft OLE DB Provider for SQL Server (0x80004005) [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. /Websites/ConnTest2.asp, line 23 Line 23 is rs_ContactForm.Open SQL_ContactForm, Connection_05,1,3 And the connection string is as in first post. It works on my colleague computer so it does connect but just not on my machine. I've looked at IIS, I didn't see anything that jumped out at me but I don't really know what I'm looking for. |
|
#6
|
|||
|
|||
|
You'll need to look in SQL Server Enterprise manager on the remote server and right click on the database within this and view properties and check out the security, make sure its setup correctly. Also, is the username/password/server ip the same as in your boss's code?
|
|
#7
|
|||
|
|||
|
It's the exact same code transfered over to his machine to make sure there weren't any changes.
I've asked him about Enterprise Manager as I don't have administrator permissions on it, and he says it's all set up correct. We've just pinged and telnet on various ports to our remote server from my machine, so I'm getting a connection, but the page just won't work. |
|
#8
|
|||
|
|||
|
Could you post the connection string?
|
|
#9
|
|||
|
|||
|
The connection string up in the first message.
|
|
#10
|
|||
|
|||
|
Oh...right...
Anyway, for the Data Source are you using an IP address or a machine name? And have you tried connecting to other dbs on that server than ContactForm with any success? |
![]() |
| Tags |
| remote, local |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Connecting to remote server/sage using php? | MercJones | PHP Forum | 2 | Mar 19th, 2008 12:44 |
| remote access | acrikey | Starting Out | 6 | Apr 3rd, 2007 05:01 |
| asp.net installation on remote server | dave2006 | ASP.NET Forum | 1 | Feb 16th, 2007 18:46 |
| Remote Linking CSS in the <body> area. | Syody | Web Page Design | 9 | Jul 21st, 2005 22:11 |