Hello! I'm new to this forum and also new to using ASP and SQL and Access. I am in need of some help. I'm trying to make a database to help my football team. I've pretty much got the whole thing done to where a coach can enter new games and various plays within those games. Now I've reached the hard part.
I need to make a process page that will help me query the database given varying situations. Below is an image of the page that the query will reside on.
I've removed the rights so you can go to the actual page at http://www.clintpatterson.com/Eagle_...n/Db_Query.asp
Below is my startings of a process page, but I don't know how to make it actually work and my syntax is all off. Do you guys have any insight into something that could help?
Thanks
I need to make a process page that will help me query the database given varying situations. Below is an image of the page that the query will reside on.
I've removed the rights so you can go to the actual page at http://www.clintpatterson.com/Eagle_...n/Db_Query.asp
Below is my startings of a process page, but I don't know how to make it actually work and my syntax is all off. Do you guys have any insight into something that could help?
Thanks
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
' defines page from which information is coming
<form method="get" action="Db_Query.asp">
'Variable listed below here
'--------------------------------------------------------------------
Results_Page = "db_query_results.asp"
Dim VarGame_Title = request.form("Game_Title")
Dim VarFormation = request.form("Formation")
Dim VarDown = request.form("Down")
Dim VarDistance_Symbol = request.form("Distance_Symbol")
Dim VarDistance = request.form("Distance")
Dim VarHash = request.form("Hash")
Dim VarStrength = request.form("Strength")
Dim VarGain_Loss = request.form("Gain_Loss")
Dim VarBench = request.form("Bench")
Dim VarResult = request.form("Result")
if VarGame_Title <> "" then
sqlst = sqlst + "Game_Title =" + VarGame_Title
endif
if VarFormation <> "" then
sqlst = sqlst + "Formation =" + VarFormation
endif
if VarDown <> "" then
sqlst = sqlst + "Down =" + VarDown
endif
if VarDistance_Symbol = "none" then
sqlst = sqlst + "Distance_Symbol =" + VarDistance_Symbol
elseif VarDistance_Symbol = ">" then
sqlst = sqlst + ">"
elseif VarDistance_Symbol = "<" then
sqlst = sqlst + "<"
elseif VarDistance_Symbol = "=" then
sqlst = sqlst + "=" then
elseif VarDistance_Symbol = ">=" then
sqlst = sqlst + ">="
elseif VarDistance_Symbol = "<=" then
sqlst = sqlst + "<="
endif
if VarDistance <> "" then
sqlst = sqlst + "Distance =" + VarDistance
endif
if VarHash <> "" then
sqlst = sqlst + "Hash =" + VarHash
endif
if VarStrength <> "" then
sqlst = sqlst + "Strength =" + VarStrength
endif
if VarGain_Loss <> "" then
sqlst = sqlst + "Gain_Loss =" + VarGain_Loss
endif
if VarBench <> "" then
sqlst = sqlst + "Bench =" + VarBench
endif
if VarResult <> "" then
sqlst = sqlst + "Result =" + VarResult
endif
Response.Write(sqlst)
Response.Redirect(Results_Page)
%>
Comment