<% dim TSize tsize = request("size") 'Get the size variable if it's around 'Make sure it's within valid parameters if isnumeric(tsize) = false then tsize = 2 if tsize=0 then tsize = 2 if tsize>5 then tsize = 5 'Now throw it back to a string for the SQL query! tsize = cstr(tsize) 'Create object. In this case Connection to a database Set Conn = Server.CreateObject("ADODB.Connection") 'Select provider Conn.Provider = "Microsoft.Jet.OLEDB.4.0" 'Select data source. 'Server.MapPath function is equivalent to app.path function of VB 'It returns the directory in which the script is present Conn.ConnectionString = "Data Source=" & Server.MapPath ("database\scores.mdb") 'Open the connection Conn.Open 'Create recordset Set Rs = Server.CreateObject("ADODB.Recordset") 'Open recordset with the connection which we have created earlier 'you must be familiar with SELECT statement , 'If not check my VB tutorial section. tDate = cdate(date()) 'Select all the ones from the current size, with today's date, and order them descending! sql = "SELECT * FROM tblScores WHERE (tblscores.GameSize='" & tsize & "' AND tblscores.time =#" & tdate & "#) order by tblScores.score DESC;" Rs.Open sql,conn,1,3 'Rs.Open "SELECT tblScores.* FROM tblScores WHERE (((tblScores.Size)=1)) ORDER BY tblScores.Score DESC;", Conn, 1,3 %>

 

 


 

F.A.Q. Page

Current Version:
1.5

Copyright 2001

 

 

Q:  Why isn't there anything on this page?

A: Because it's under construction :)

 

 

Think you're good at games of skill?  
Want to compete with other players (including us) around the world for real cash?

 

Click here to give it a shot.  They start you with $5 for free!

 

CHUCK HALL

<%set Rs = nothing set Conn = nothing%>