I can't connect my ASP page with MSSQL
This is what my connect.asp looks like.
<Html>
<Head>
<Title> Testing Our Connection </Title>
</Head>
<Body>
<%
Dim adOpenForwardOnly, adLockReadOnly, adCmdTable
adOpenForwardOnly=0
adLockReadOnly=1
adCmdTable=2
Dim objConn, objRS
Set objConn = Server.CreateObject("ADODB.CONNECTION")
Set objRS = Server.CreateObject("ADODB.RECORDSET")
Dim strDatabaseType
strDatabaseType = "MSDE"
objConn.Open "Driver={SQL Server};" & _
"Server=127.0.0.1;" & _
"Database=payroll;" & _
"Uid=;" & _
"Pwd=;"
objRS.Open "payroll", objConn, adOpenForwardOnly,adLockReadOnly, adCmdTable
While not objrs.eof
rsponse.write objrs.fields("emp_id") & "<br>"
objrs.movenext
Wend
objrs.Close
Set objrs = Nothing
objconn.Close
Set objconn = Nothing
%>
</body>
</html>
But when I open it in my IE I get the following Error Message.
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'ADMINISTRATOR\IUSR_FAHAD'.
/begasp/connect.asp, line 22
Line 22 is the connection string line on my editor.
Please can someone telll me how can I fix this problem.