You have to define your DSN/connection properly.
For example:
Code:
<%
dim sdsn
dim Conn
sdsn="DBQ=" & Server.Mappath("SomeDB.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open sdsn
%>
Of course, that's using an DSNless connection to an Access database, which you're not using.
So I'll revise that code:
If you have a DSN, then use something like:
Code:
<%
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=myCONNECTION.dsn"
objConn.Open
DIM mySQL
mySQL = "SELECT * FROM myTABLE"
DIM objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open mySQL, objConn
%>
Or - assuming you don't have a DSN, something along the lines of:
Code:
<%
Set Conn = Server.CreateObject("ADODB.Connection")
FilePath="DRIVER={SQLServer};SERVER=TheServer;UID=TheUser;PWD=ThePassword;DATABASE=TheDatabase"
Conn.open FilePath
%>
I am a loud man with a very large hat. This means I am in charge