Monday, February 20, 2012

Problem with updating a mobile sql database

This is strange. Cause earlier I could update the mobile sql server with no problem, but now I am getting this parsing error

it says Token line number = 1, ....

The windows mobile emulator works, but not in the actual pda.

The sql query is following
sql2 = "update flexi_pump set difference = " + divergence + " where tag = '" + tag + "'";

selecting data from the database works fine, no problem with it. only writing to it is the problem SadI would recommend using command parameters to avoid occasional string concatenation mishaps and possible SQL injection attacks on your code. If the tag variable is a string, it may contain a quote and it will break the syntax.

No comments:

Post a Comment