Hey.

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:

Code:
Code ASP:
<%
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")
 
%>
It only gives me:

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"

Many thanks.