BigBadDave
Programmer
Whats wrong with this code :
<%
score = Request("score"
fname = Request("fname"
lname = Request("lname"
email = Request("email"
data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("scores.mdb"
set rspl = Server.CreateObject("ADODB.Recordset"
rspl.open "select * from t_scores where ( score = '" & score & "' ) and ( email = '" & email & "')", data_source
If rspl.EOF and rspl.BOF Then
Set con = Server.CreateObject("ADODB.Connection"
con.Open data_source
set rs = server.createobject("adodb.recordset"
rs.open "t_scores", con, 2, 2
rs.addnew
if score="" THEN
rs("score" = NULL
Else
score = Replace(score,vbCrlf,""
rs("score" = score
END IF
if fname="" THEN
rs("fname" = NULL
Else
fname = Replace(fname,vbCrlf,""
rs("fname" = fname
END IF
if lname="" THEN
rs("lname" = NULL
Else
lname = Replace(lname,vbCrlf,""
rs("lname" = lname
END IF
if email="" THEN
rs("email" = NULL
Else
email = Replace(email,vbCrlf,""
rs("email" = email
END IF
rs.update
rs.movelast
set rs = nothing
set con = nothing
End If
rspl.close
set rspl = nothing
%>
I get the following error :
Error Type:
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
/web/flashgame/send_score.asp, line 9 Regards
Big Dave
** If I am wrong I am sorry, but i'm only trying to help!! **
<%
score = Request("score"
fname = Request("fname"
lname = Request("lname"
email = Request("email"
data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("scores.mdb"
set rspl = Server.CreateObject("ADODB.Recordset"
rspl.open "select * from t_scores where ( score = '" & score & "' ) and ( email = '" & email & "')", data_source
If rspl.EOF and rspl.BOF Then
Set con = Server.CreateObject("ADODB.Connection"
con.Open data_source
set rs = server.createobject("adodb.recordset"
rs.open "t_scores", con, 2, 2
rs.addnew
if score="" THEN
rs("score" = NULL
Else
score = Replace(score,vbCrlf,""
rs("score" = score
END IF
if fname="" THEN
rs("fname" = NULL
Else
fname = Replace(fname,vbCrlf,""
rs("fname" = fname
END IF
if lname="" THEN
rs("lname" = NULL
Else
lname = Replace(lname,vbCrlf,""
rs("lname" = lname
END IF
if email="" THEN
rs("email" = NULL
Else
email = Replace(email,vbCrlf,""
rs("email" = email
END IF
rs.update
rs.movelast
set rs = nothing
set con = nothing
End If
rspl.close
set rspl = nothing
%>
I get the following error :
Error Type:
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
/web/flashgame/send_score.asp, line 9 Regards
Big Dave
** If I am wrong I am sorry, but i'm only trying to help!! **