This is code for a calendar application that saves info to the database based on date. It is not giving an error when processed. Nothing is being inserted into the database and nothing is being updated either. Can anyone help?
Dim vDate
Dim chkTxt
Dim DiaryID
vDate = request("view_date"
Call OpenDB()
' Check to see if it's a new record to be added or an old one to update
StrSql= "Select * from diary where dte = '$vDate'"
set rs = DbConn.Execute (StrSql)
chkTxt = chkString(request("txt")
if rs.BOF or rs.EOF then ' No records found. i.e. New record
StrSql ="INSERT INTO diary (dte, text_field) values ('" & vDate & "','" & chkTxt & "')"
else ' Record found. i.e. update record.
DiaryID = rs("id"
StrSql = "UPDATE diary SET diary.dte = '$vDate', text_field = '$chkTxt' WHERE id = '$DiaryID'"
End If
DbConn.Execute (strSql)
Dim vDate
Dim chkTxt
Dim DiaryID
vDate = request("view_date"
Call OpenDB()
' Check to see if it's a new record to be added or an old one to update
StrSql= "Select * from diary where dte = '$vDate'"
set rs = DbConn.Execute (StrSql)
chkTxt = chkString(request("txt")
if rs.BOF or rs.EOF then ' No records found. i.e. New record
StrSql ="INSERT INTO diary (dte, text_field) values ('" & vDate & "','" & chkTxt & "')"
else ' Record found. i.e. update record.
DiaryID = rs("id"
StrSql = "UPDATE diary SET diary.dte = '$vDate', text_field = '$chkTxt' WHERE id = '$DiaryID'"
End If
DbConn.Execute (strSql)