Internet connection to SQL Server using ASP/ADO

greenspun.com : LUSENET : SQL Server Database Administration : One Thread

I am desperatley trying to connect to an SQL database over an Intranet. I am embeding the following ASP script in an HTML page:

set conn=server.createObject("ADODB.connection") strConn = "Provider=MSDASQL;Driver={SQL Server};" & _ "Server=WNRSQL1;Database=QTSII;UID=sa;PWD=;" strSQL = "SELECT * FROM cabinet"

conn.Open strConn rsAuthors.Open strSQL, conn, adOpenStatic, adLockReadOnly, adCmdText ---> but I keep getting the following error when I run the .asp page from my browser

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC SQL Server Driver][DBNMPNTW]ConnectionOpen (CreateFile()).

/scripts/item.asp, line 14

--> Any ideas. NB I have also trying to run the above with a DSN, but I get the exact same result

-- Anonymous, November 23, 1998

Answers

Re: Internet connection to SQL Server using ASP/ADO

Cindy,

Check out these Microsoft Knowlege Base articles:

http://support.microsoft.com/support/kb/articles/q175/6/71.asp http://support.microsoft.com/support/kb/articles/q183/0/60.asp (particularly, look at the notes about the error message you are getting)

By the way, the format for looking up Microsoft Knowledge Base Articles (Q articles) is http://support.microsoft.com/support/kb/articles/Qxxx/x/xx.asp (Enter the article number for the X's.)

Eric

-- Anonymous, November 30, 1998


Moderation questions? read the FAQ