Results 1 to 3 of 3
Feb 13, 2012, 02:59 #1
- Join Date
- Feb 2012
- 0 Post(s)
- 0 Thread(s)
New to ASP classic, need help connecting to sql-database and output
I have a client who needs an ASP-script that just connects to the database and outputs the contents.
This is easy for me in PHP but I'm new to classic ASP and although I've read tutorials I'm having trouble connecting.
This is the last connect-script I've tried:
<% dim con, Rs set con=server.CreateObject("adodb.connection") con.Open "Provider=sqloledb;SERVER=localhost;DATABASE=database_name;UID=username ;PWD=password;" set Rs=server.CreateObject("adodb.recordset") %>
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.
test.asp, line 4
So I need help with this, how to connect and how to test it. In other words, when connected, I need help outputting for example the contents in table "Title"