% ' *********** 15 March 2004 ************ ' ASP Code by Reginald Wooden - Austin Peay State University ' Reads sequential entry from MS Access Database and ' displays cooresponding university record on home ' page based based on the current time. ' ************************************** ' --> Stores second of current time in variable intRecord = Second(Now()) ' --> Initiallizes and locates the MS Access database strconn="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" strconn=strconn & server.mappath("/fpdb/universities.mdb") ' --> Connects to and Opens MS Access Database Set Connect = Server.CreateObject("ADODB.Connection") Connect.open strconn ' --> Creates and Executes SQL query to get last record number strSQL = "Select MAX(ID) AS intMax FROM Results" Set InMax = Connect.Execute(strSQL) ' --> Saves results of SQL query in RecordSet intLastRec = InMax("intMax") ' --> Checks to see if second of current time = 0; sets to 1 if true If intRecord = 0 then intRecord = 1 ' --> Decrements second of current time until it is less than or equal to last record do until intRecord <= intLastRec intRecord = intRecord - intLastRec loop ' --> Reads 1 record based on second of current time and stores in RecordSet strSQL = "Select * FROM Results WHERE ID = " & intRecord Set InUniversity = Connect.Execute(strSQL) %>
|
||||||||||||||
|
TTC Program Offerings
|
||||||||||||||