Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Contributor
sprintagal
Posts: 30
Registered: 02-16-2010
My Carrier: Me
Accepted Solution

Gears update statement syntax

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]);

 

Please use plain text.
Contributor
sprintagal
Posts: 30
Registered: 02-16-2010
My Carrier: Me

Re: Gears update statement syntax

        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... 

 

 

 

Please use plain text.