home *** CD-ROM | disk | FTP | other *** search
/ Using Visual Basic 5 (Platinum Edition) / vb5.iso / Code / ch39 / ADO_Example.asp < prev    next >
Encoding:
Text File  |  1997-07-08  |  410 b   |  29 lines

  1. <%@ LANGUAGE="VBSCRIPT" %>
  2. <html>
  3.  
  4. <head>
  5. <title>Sample</title>
  6. </head>
  7.  
  8. <body>
  9. <%
  10. Set conn = Server.CreateObject("ADODB.Connection")
  11. Conn.Open "DSN=LocalTraining"
  12.  
  13. SQL = "SELECT Course.* FROM Course"
  14.  
  15. Set RSCourses = Conn.Execute(SQL)
  16.  
  17. RSCourses.MoveFirst
  18.  
  19. Do While Not RSCourses.EOF
  20. %>
  21. <p><%=RSCourses("Title")%></p>
  22. <%
  23.     RSCourses.MoveNext
  24. Loop
  25.  
  26. RSCourses.Close
  27. %></body>
  28. </html>
  29.