<%@ LANGUAGE = VBScript %> <% 'Only one scripting language can be used at a time. The choices are 'VBScript and Microsofts version of JavaScript which it calls JScript. 'The line below establishes VBScript as the scripting language for this page. 'This line should be near the top of each and every ASP page. %> <% 'Dr. Thomas E. Hicks - Trinity University - File DisplayUser01.asp 'Display all information in all records from table Users of the Security Database. 'Use the List approach - approach ok for output only!%> <% 'Option Explicit forces the explicit declaration of all variables. Put at top of page.%> <% Option Explicit %> <% 'Directory Common created in InetPub/wwwroot. A copy of file adovbs.inc [constants 'for VBscript included - bundled with Access] is now placed in the Common directory. 'File adojavas.inc includes the constants for JScript. 'Placing these in Common directory will keep web site functionality independent from 'the location in which Access, FoxPro, etc. are loaded. Put near top of page! %> DisplayUser01.asp <% 'Declare/Create Variables Conn and UsersLst Dim Conn, UsersLst 'Create a Connection Object Set Conn = Server.CreateObject ("ADODB.Connection") 'Open Security ODBC with the Connection Object Conn.Open "Security" 'Fill the UsersLst List with the Results of the SQL Query Set UsersLst = Conn.Execute ("SELECT * FROM Users") %>
Display Users [List] - DisplayUser01.asp
Dr. Thomas E. Hicks
Trinity University

<% Do Until UsersLst.EOF %> Name : <% = UsersLst ("NAME") %>
No : <% = UsersLst ("NO") %>
Password : <% = UsersLst ("PASSWORD") %>
ID No : <% = UsersLst ("IDNO") %>

<% UsersLst.MoveNext Loop ' Close the Connection. I try to close the connection asap. Conn.Close %>