hrmmm I tried the code you gave me smokie, and while I understand what it does and all.. the way you did it is a lot different then I normally do it. I am getting an error on line 16 which is this:
- Code: Select all
Set objRS = objConn.Execute("SELECT [ID],[PageName] FROM Page")
and here's the entire thing...
- Code: Select all
<% Set connectionToDatabase=Server.CreateObject("ADODB.Connection")
connectionToDatabase.ConnectionTimeout=60
connectionToDatabase.Open "DSN=Mydatabase"
dim objRS
dim objConn
objRS = recordSet
objConn = connectionToDatabase
Set objRS = objConn.Execute("SELECT [ID],[PageName] FROM Page")
If objRS.EOF Then
Response.Write "no records"
Else
Do While Not objRS.EOF
Response.Write "<a href=details.asp?ID="&objRS("ID")&">"&objRS("PageName")&"</a>"
objRS.MoveNext
Loop
End If
objConn.Close
Set objConn = Nothing
%>
thanks for your help
ohhh and this is the error....
Microsoft VBScript runtime error '800a01a8'
Object required: 'Provider=MSDASQL.1;E'
/tests/querystrings.
asp, line 16