Hi friends,
Can anyone help me in connecting sql server and asp.
Wheneever try to do the connection, I am getting following error. All the connection string which i am using are correct.
can you help me.
Following are the error line
--------------------
Microsoft OLE DB Provider for SQL Server error '80004005'
Invalid connection string attribute
/MAsteringASP/global.asa, line 17
Microsoft OLE DB Provider for SQL Server error '80004005'
Invalid connection string attribute
/MAsteringASP/test2.asp, line 21
----------------
Please ckeck my code which I am using for connection
Thank you
Graceson MAthew
--------------------
<%@. Language =VBScript %>
<% option explicit %>
<Html>
<head>
<title> Database Connection </title>
</head>
<body>
<%
<!-- #INCLUDE FILE="adovbs.inc" -->
dim conn
dim sql
dim r
dim aConnectionString
Set conn=Server.CreateObject("ADODB.Connection")
conn.Mode=adModeReadWrite
conn.Open="Provider=SQLOLEDB;UID=Administrator;Password=passw d;Initial Catalog=nrth;Datasource=server ip;Port Number= 80"
Response.Write (" Database Connectivity")
%>
</body>
</html>try this type of connection string
driver={SQL Server};server=Server ip\DontForgetTheInstanceName;uid=Administrator;pwd =password;Database=nrth|||Also KBA (http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q169/3/77.asp&NoWebContent=1) to detail the connection between ASP & SQL Server.
HTH|||I don't recall Port NMumber being used in a connection string. Maybe if you took that part out?|||Ensure SQL uses that port and enabled on server or that port is not used by any other application.|||oh gosh, can't believe nobody saw this one!
replace uid with user id
:D :D :D :D :D|||Hehe. I guess that would be a problem for SQLOLEDB. Was UID phased out with the previous driver? Can't even remember what it was called. MSQL something-or-other.|||MSDASQL|||Dear karolyn,
Thank you for your reply, i attended the problem i the way you suggested .But now i am getting some other error, which is also could not rectify me,
now error is in following way
------
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
//global.asa, line 17
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
/test2.asp, line 21
----------------------
Will you please help me .
graceson
Originally posted by Karolyn
try this type of connection string
driver={SQL Server};server=Server ip\DontForgetTheInstanceName;uid=Administrator;pwd =password;Database=nrth|||http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q328306 to deal the issue.|||i think you're trying to use windows authentication. in this case you need to try this:
conn.Open="Provider=SQLOLEDB;Integrated Security=SSPI;Initial Catalog=nrth;Datasource=server ip;Port Number= 80"
also, i noticed that if this is your "exact" connection string, you need to know the ip address of the server, as well as the actual port it's listening on. confirm it's port 80, otherwise the default is 1433 (port 80 is the default for http)
No comments:
Post a Comment