View Single Post
  #8 (permalink)  
Old Aug 27th, 2004, 03:39
courtjester courtjester is offline
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
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