Book Library - revExecuteSQL in 7.0 (rc 2)
Posted: Thu Sep 25, 2014 10:35 pm
Hi,
I tried updating the command bookupdate to have placeholders to help with have special characters in the data... if I entered in a book with a title that has a quote - I can't update that book unless I take the quote out. I modified these lines
And replaced it with this code...
It says the book was updated but the change never occurs - when I revert to the original code it works, I am making some kind of obvious error?
Thanks,
Ripper
I tried updating the command bookupdate to have placeholders to help with have special characters in the data... if I entered in a book with a title that has a quote - I can't update that book unless I take the quote out. I modified these lines
Code: Select all
## Construct the SQL statement and execute it on the database
put "UPDATE books SET status='" & pStatus & "', title='" & pTitle & "',author='" & pAuthor & "',comments='" & pComments &"' WHERE BookID = '" & pBookID & "'" into tSQLStatement
revExecuteSQL sDatabaseID,tSQLStatement
Code: Select all
put "UPDATE books SET status = :1, title = :2, author = :3, comments = :4 WHERE BookID = :5" into tSQLStatement
revExecuteSQL sDatabaseID, tSQLStatement, "pStatus","pTitle","pAuthor","pComments","pBookID"
Thanks,
Ripper