06-13-2010 12:14 AM
I obviously have something messed up with the syntax of the following statement but I can't figure it out.... anyone know what im doing wrong?
_db.execute('UPDATE sbItems SET sbs1 = ? WHERE thedate = ?', [td,db]);
Solved! Go to Solution.
06-13-2010 02:05 AM
sql = 'select * from sbItems where thedate = ?';
rs = _db.execute(sql,[thedate]);
if (rs.isValidRow()) {
sql = 'UPDATE sbItems SET sbs1 = ? WHERE thedate = ?';
_db.execute(sql, [sbs1,thedate]);
} else {
alert("Row not Found");
}
Turns out I had a problem with my thedate formating that was causing the problem, the code above will work if anyone else happens to search for this..... FYI "thedate" is actually a string and not a date in my table...