I am using SQL Lite… and all seems to work well in my app to a point. I am updating the table of my database, and as long as I assign an actual number or string to the ‘columns’ (i.e… data fields), it works fine. But, I have a variable that gets changed during my app, and when the app gets ready to close, this variable is what needs to get saved to the database.
here is my sql code for updating the table:
[[UPDATE gameData SET playerName = ‘Frank’, credits = totalCredits WHERE id=1 ;]]
‘totalCredits’ is a variable used throughout my app, and assigning it to the database column ‘credits’ causes the update to fail. The update just doesn’t occur, and my simulator/terminal posts no errors. However, if I assign a hard-value to that column (credits), the update occurs as it should.
How does one update the sql table using variables??? Is a cast required, or some sql symbol needed to preceed a variable? Did some searching on line for sql tutorials, but never saw this explained.
Thanks [import]uid: 148857 topic_id: 30907 reply_id: 330907[/import]