|
-
Apr 1st, 2003, 05:21 PM
#1
Thread Starter
Frenzied Member
MSSQl Connection for TCP/IP - not Named Pipes
I'm having a tough time here figuring this out. I tried the asp code below to connect to my mssql server but it fails and the support people say I am trying to connect using named pipes and need to change it to tcp/ip. Can someone show me what I need to change to make it into tcp/ip connection? I would GREATLY appreciate it!
<%
function set_conn(func_opt, func_conn )
if func_opt = true then
set set_conn = createobject("adodb.connection")
set_conn.open "DRIVER={SQL Server};SERVER=sql2k.website.com;UID=myid;PWD=mypassword;DATABASE=mydb"
else
func_conn.close
set func_conn = nothing
end if
end function
Set conn = set_conn(true,null)
Set RS = server.CreateObject("adodb.recordset")
mysql = "Select userno From mytable where email = '" & trim(UN2) & "' and password = '" & trim(PW2) & "'"
RS.Open mysql, conn
And I get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][Named Pipes]Access denied.
Thanks!
-
Apr 1st, 2003, 05:38 PM
#2
I think you have to use an actual IP address..... oooorrrr.... now that I think about it.....there is a tool called the SQL Server Client Netweork Utility --- run that... and make sure the TCP/IP has been enabled. I think that Named Pipes is the only enabled connection type by default. While you are at it, you'll probably will want to move TCPIP up to the top of the list -- SQL will connect in the order specified top to bottom.
-
Apr 1st, 2003, 05:42 PM
#3
Thread Starter
Frenzied Member
I don't think I can do any of this. I am using a shared sql server with my hosting server and I was just provided the sql server name, database, user id and password.
Any thoughts anyone?
-
Apr 1st, 2003, 05:44 PM
#4
This is a CLIENT tool.... it doesn't affect the server, just how you connect to it.
-
Apr 1st, 2003, 05:53 PM
#5
Thread Starter
Frenzied Member
I wrote support to who runs the servers and they said it was in my script. Of course, their support sucks so bad, they could not have even pointed out what I needed to change!
Their reply:
The reason you can't connect is because your ASP script is using NamedPipes for connection. Change it to a TCPIP connection string and you should be good to go.
-
Apr 1st, 2003, 06:00 PM
#6
Originally posted by WarrenW
I wrote support to who runs the servers and they said it was in my script. Of course, their support sucks so bad, they could not have even pointed out what I needed to change!
Their reply:
The reason you can't connect is because your ASP script is using NamedPipes for connection. Change it to a TCPIP connection string and you should be good to go.
Man that sucks.....
I found this: http://msdn.microsoft.com/library/de...tringTopic.asp
Based on that, I'd suggest trying Address insead of server.....
-
Apr 1st, 2003, 06:06 PM
#7
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|