Not sure if this belongs in here or as a bug so apologies if I’ve put this query in the wrong place.
In one of my prepared statements I made the mistake? of putting dataset = ps.SQLSelect() rather than ps.SQLExecute().
I didn’t realise at the time and I was able to run and build without an exception. See example below:
sql = “select * from user_notes where refno_note=?”
ps=session.gdb.Prepare(sql)
ps.BindType(0,SQLitePreparedStatement.SQLITE_TEXT)
ps.Bind(0,temp_ref)
dataset =ps.SQLSelect()
if dataset.field(“web_status”).StringValue= “Created” then
sql = “delete from user_notes where user_notes.refno_note=? and user_notes.web_status=‘Created’”
ps=session.gdb.Prepare(sql)
ps.BindType(0,SQLitePreparedStatement.SQLITE_TEXT)
ps.Bind(0,temp_ref)
dataset = ps.SQLSelect()
When I uploaded this build to my apache web server and tried to delete, apache crashed with the following error:
*** Error in `/example/myapp’: free(): invalid pointer: 0xb333bfc8 ***
Which prompted me to go back into my code and change that last line to ps.SQLExecute().
So I suppose my question is, how come I was able to build with the original code and delete without any issues while in the debug
build?
Thanks,
Owen