Rubens Jr. wrote: > > I have a global buffer that I use in all querys and to retriev data in my > callback funcs. Example : > > This have worked with version 2.8.12, but when I upgrade to 2.8.13 my > application sometimes show stranges errors like 'near "xxxxx" : syntax error' > where xxxxx is some of my database data !! > > But, if I use _different_ buffers to SQL command and to retriev data this > erros do not appear !! It seems that in version 2.8.13 SQLITE use the buffer > from the SQL command to do something else !! Is this true ? Is it not > possible to use same buffer in sqlite_exec and the callback function ? >
SQLite expects the SQL string that you pass in to be unchanged until the SQL has finished executing. If you changes the SQL string before that, errors can happen, including segfaults. If it worked in 2.8.12, it was only because you were lucky.
> If so I have to rewrite / review all of my application >
Here is a quick fix for your SQLite problem: Go through your whole program and every place you you sqlite_exec(), change the code to use sqlite_exec_printf() instead. You can read about how sqlite_exec_printf() works in the online docs.
-- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]