Hail,
I'm having problems updating my recordset. What I want to do is update my table Players with the data from the previous page using request.querystring and request.form. This is my code:
<%
sql = "select * from Players WHERE UserID like '" & ucase(request.querystring("Player") & "'"
Set Conn = Server.CreateObject("ADODB.Connection"
Conn.Open "Gladiators", "Glad", "glad"
Set rs = Server.CreateObject("ADODB.Recordset"
rs.cursortype = 2
rs.cursorlocation = 1
rs.locktype = 2
rs.Open sql, Conn
%>
<%
if not rs.eof then
rs("Race" = request.form("cmbRaces"
rs("ChrName" = request.form("txtChrName"
rs("Hit" = request.querystring("HIT"
rs("Par" = request.querystring("PAR"
rs("Dam" = request.querystring("DAM"
rs("Arm" = request.querystring("ARM"
rs("Lif" = request.querystring("LIF"
rs("Wil" = request.querystring("WIL"
rs("Cha" = request.querystring("CHA"
if request.form("cmbSkills" = "Dive" then
rs("Dive" = 1
elseif request.form("cmbSkills" = "FirstStrike" then
rs("FirstStrike" = 1
elseif request.form("cmbSkills" = "Dodge" then
rs("Dodge" = 1
elseif request.form("cmbSkills" = "Fake" then
rs("Fake" = 1
elseif request.form("cmbSkills" = "DeathBlow" then
rs("DeathBlow" = 1
elseif request.form("cmbSkills" = "Acrobatics" then
rs("Acrobatics" = 1
elseif request.form("cmbSkills" = "Regenaration" then
rs("Regenaration" = 1
elseif request.form("cmbSkills" = "Taunt" then
rs("Taunt" = 1
end if
rs.update
rs.close
end if
%>
I'm having problems updating my recordset. What I want to do is update my table Players with the data from the previous page using request.querystring and request.form. This is my code:
<%
sql = "select * from Players WHERE UserID like '" & ucase(request.querystring("Player") & "'"
Set Conn = Server.CreateObject("ADODB.Connection"
Conn.Open "Gladiators", "Glad", "glad"
Set rs = Server.CreateObject("ADODB.Recordset"
rs.cursortype = 2
rs.cursorlocation = 1
rs.locktype = 2
rs.Open sql, Conn
%>
<%
if not rs.eof then
rs("Race" = request.form("cmbRaces"
rs("ChrName" = request.form("txtChrName"
rs("Hit" = request.querystring("HIT"
rs("Par" = request.querystring("PAR"
rs("Dam" = request.querystring("DAM"
rs("Arm" = request.querystring("ARM"
rs("Lif" = request.querystring("LIF"
rs("Wil" = request.querystring("WIL"
rs("Cha" = request.querystring("CHA"
if request.form("cmbSkills" = "Dive" then
rs("Dive" = 1
elseif request.form("cmbSkills" = "FirstStrike" then
rs("FirstStrike" = 1
elseif request.form("cmbSkills" = "Dodge" then
rs("Dodge" = 1
elseif request.form("cmbSkills" = "Fake" then
rs("Fake" = 1
elseif request.form("cmbSkills" = "DeathBlow" then
rs("DeathBlow" = 1
elseif request.form("cmbSkills" = "Acrobatics" then
rs("Acrobatics" = 1
elseif request.form("cmbSkills" = "Regenaration" then
rs("Regenaration" = 1
elseif request.form("cmbSkills" = "Taunt" then
rs("Taunt" = 1
end if
rs.update
rs.close
end if
%>