I want to check if there is something in the recordset, but it always returns "3" (also the number of cols if this has anything to do with it).
How do i test if there is a record in the recordset?
Here is the code (that fails):
ssql = "select * from doelpunten where speeldag = " & request.form("speeldag" & " AND spelerid = " & request.form("doelpunt" & i)
response.write ssql
ploeg2 = conn.execute(ssql)
'-------------------------------------------
' CHECK IF THERE IS A RECORD IN RECORDSET
'-------------------------------------------
if ploeg2.count <> 0 then
'-------------------------------------------
ssql = "update doelpunten set doelpunten = " & ploeg2.fields("doelpunten" + 1 & " where spelerid = " & request.form("doelpunt" & i) & " AND speeldag = " & request.form("speeldag"
else
ssql = "insert into doelpunten values('" & request.form("doelpunt" & i) & "','" & request.form("speeldag" & "','1')"
end if
'response.write ssql
set setdp = conn.execute(ssql)
How do i test if there is a record in the recordset?
Here is the code (that fails):
ssql = "select * from doelpunten where speeldag = " & request.form("speeldag" & " AND spelerid = " & request.form("doelpunt" & i)
response.write ssql
ploeg2 = conn.execute(ssql)
'-------------------------------------------
' CHECK IF THERE IS A RECORD IN RECORDSET
'-------------------------------------------
if ploeg2.count <> 0 then
'-------------------------------------------
ssql = "update doelpunten set doelpunten = " & ploeg2.fields("doelpunten" + 1 & " where spelerid = " & request.form("doelpunt" & i) & " AND speeldag = " & request.form("speeldag"
else
ssql = "insert into doelpunten values('" & request.form("doelpunt" & i) & "','" & request.form("speeldag" & "','1')"
end if
'response.write ssql
set setdp = conn.execute(ssql)