SQL DB connection error...
Posted on 2005-04-25
I have a webserver (W2k) and a separate SQL (2000 ) server.
I configured ODBC on the webserver and the test was successfull:
Microsoft SQL Server ODBC Driver Version 03.80.0194
Running connectivity tests...
Verifying option settings
Disconnecting from server
TESTS COMPLETED SUCCESSFULLY!
I use SQL server authentication and the integrated sql account has public and db_datareader rights.
I created an .asp page to use this ODBC to connect to the database and read all contents of a given table.
Unfortunately when accessing the asp page it returns the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
The contents ( the part which should make the connection) of the page is as follows:
Dim Connect, selectSQL, RecSet
Set Connect = CreateObject ("ADODB.Connection")
selectSQL = "SELECT * FROM TABLE"
Set RecSet = Connect.Execute (selectSQL)
If NOT RecSet.EOF THEN
DO UNTIL RecSet.EOF
Response.Write RecSet("1") & ", " & RecSet("2") & "<BR><BR>"
Set RecSet = Nothing
Set Connect = Nothing
Can you maybe help me on this? It's giving me a hard time....