RE: [sqlite] Diferent behavior in 2.8.12 and 2.8.13

2004-03-23 Thread ben . carlyle
"Williams, Ken" <[EMAIL PROTECTED]> 24/03/2004 09:19 AM To: "'Rubens Jr.'" <[EMAIL PROTECTED]> cc: [EMAIL PROTECTED] Subject: RE: [sqlite] Diferent behavior in 2.8.12 and 2.8.13 > That's probably a

RE: [sqlite] Diferent behavior in 2.8.12 and 2.8.13

2004-03-23 Thread Williams, Ken
> -Original Message- > From: Rubens Jr. [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 23, 2004 5:00 PM > > I read the OnLine Doc many times and I do not notice this : > "SQLite expects the SQL string that you pass in to be > unchanged until the > SQL has finished executing." > > If

Re: [sqlite] Diferent behavior in 2.8.12 and 2.8.13

2004-03-23 Thread Rubens Jr.
> > SQLite expects the SQL string that you pass in to be unchanged until > the SQL has finished executing. OK, here is the problem ... I did not knew that :( > 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 w

Re: [sqlite] Diferent behavior in 2.8.12 and 2.8.13

2004-03-23 Thread D. Richard Hipp
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 "x" : syntax error' > where x is som

Re: [sqlite] Diferent behavior in 2.8.12 and 2.8.13

2004-03-23 Thread Rubens Jr.
> > You're asking for trouble using strcpy() with arbitrary data. Your problem > may be that you're writing beyond the bounds of my_buffer. Instead of > > strcpy (my_buffer, row [0]); > > use > > strncpy (my_buffer, row [0], sizeof(my_buffer) - 1); > my_buffer[sizeof(my_buffer) - 1

Re: [sqlite] Diferent behavior in 2.8.12 and 2.8.13

2004-03-23 Thread Derrell . Lipman
"Rubens Jr." <[EMAIL PROTECTED]> writes: > intmy_callback () > { > > strcpy (my_buffer, row [0]); > ... > } > > voidmy_sql (void) > { > ... >strcpy (my_buffer, "SELECT FROM ... WHERE "); >retcode = sqlite_exec (db, my_buffer, my_callbac

[sqlite] Diferent behavior in 2.8.12 and 2.8.13

2004-03-23 Thread Rubens Jr.
Hi ! I have a global buffer that I use in all querys and to retriev data in my callback funcs. Example : charmy_buffer [2]; intmy_callback () { strcpy (my_buffer, row [0]); ... } voidmy_sql (void) { ... strcpy (my_buffer, "SELECT FROM