Sorry

<% ' Those variable are needed to work with the database DIM DB DIM RS DIM StrOpen DIM StrOpenInContruction ' This variable is used to create variable "StrOpen" DIM PathToDatabase ' The location of our database within our server PathToDatabase="C:\Sites\Single1\luthersmyre\database\score.mdb" DIM NameOfTableInDB NameOfTableInDB="high2" DIM ColunmNameIntable(2) ColunmNameIntable(0)="Id" ColunmNameIntable(1)="Nme" ColunmNameIntable(2)="HScr" ' When displaying data we will use this values DIM DataName(2) DataName(0)="Id" DataName(1)="Name" DataName(2)="Score" ' Keywords to search will be saved to variable "TheWords" DIM TheWords TheWords = "" ' Mode will be saved to this variable. Value will be "OR" or "AND" DIM TheMode 'TheMode = request.querystring("mode") DIM i,j ' Just counters For j=1 to 2 StrOpen= StrOpen & " OR " & ColunmNameIntable(j) & " LIKE '%" & TheWords & "%'" next StrOpen= "SELECT * FROM " & NameOfTableInDB & " WHERE" & Right (StrOpen,Len(StrOpen)-3) Set DB = Server.CreateObject("ADODB.Connection") DB.Open ("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & PathToDatabase) Set RS = Server.CreateObject("ADODB.Recordset") RS.Open StrOpen, DB Response.write ("
") %> <%=rs("nme")%>
Still has the High Score

Play Again

Back to Games

copyright 2004
strawberryplains.net