ACTP Requests Administration page

<%@ Language = "VBScript" %> <% Dim szDSN, szSQL, intFields, rst ' -- Specify the database to connect to via ODBC ' -- Use an existing data source name szDSN = "DSN=ACTP" ' -- OR ' -- You can also use a DSN-less connection by providing the driver and database ' szDSN = "Driver=Microsoft Access Driver (*.mdb);DBQ=C:\Data\MyDatabase.mdb" Set rst = Server.CreateObject("ADODB.Recordset") ' -- Supply a SQL statement to query by 'szSQL = "SELECT ID=ContactID, 'Download Date'=InitialContactDate, 'First Name'=FirstName, 'Last Name'=LastName, 'Company'=CompanyName FROM requests ORDER BY InitialContactDate" 'szSQL = "SELECT ContactID, InitialContactDate, FirstName, LastName, CompanyName FROM requests ORDER BY InitialContactDate" szSQL = "SELECT * FROM ShortRequest" ' -- Execute the query on the data source rst.Open szSQL, szDSN ' -- Draw a table Response.Write "" & vbCrLf Response.Write "" & vbCrLf ' -- Make a table column for each field in the query For intFields = 1 to rst.Fields.Count - 1 Response.Write "" Next ' -- Now add a column for the "View" option Response.Write "" Response.Write "" Response.Write vbCrLf ' -- Loop through the recordset and make a new row for each record Do While Not rst.EOF Response.Write "" & vbCrLf ' -- Display the value for each field in the query For intFields = 1 to rst.Fields.Count - 1 Response.Write "" Next ' -- Now add a column for the "View" option Response.Write "" Response.Write "" Response.Write vbCrLf ' -- Go to the next record rst.MoveNext Loop Response.Write "
" Response.Write rst.Fields(intFields).Name Response.Write "View
" Response.Write rst.Fields(intFields).Value Response.Write "View
" & vbCrLf ' -- Clean up rst.Close Set rst = Nothing %>