Maybe you are mixing C malloc/free with sqlite3 memory allocation routines? Like allocating from sqlite and then freeing to C or vice versa?
-----Ursprüngliche Nachricht----- Von: Bob Moran [mailto:bmo...@cicaccess.com] Gesendet: Mittwoch, 03. September 2014 06:25 An: General Discussion of SQLite Database Betreff: Re: [sqlite] Cannot retrieve SQLite Db Data Immediately After Application Startup Found more of what the issue is. I noticed that my SQL text was being overwritten on the return from the call to prepare_v2. Stepping through the SQlite3 code I discovered that a malloc call for 500+ bytes was returning a pointer 8 bytes below my SQL string. Don't have the foggiest notion as to why. My string is on the heap. If I wait some time before making the call (my program is just waiting for input, then the malloc call returns a pointer far removed from my passed in SQL text. Must be some kind on Linux issue? Bob Moran Continental Access / NAPCO Security Technologies 355 Bayview Ave. Amityville, N.Y. 11701 631.842.9400 x327 rmo...@cicaccess.com -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Roger Binns Sent: Tuesday, September 02, 2014 12:45 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Cannot retrieve SQLite Db Data Immediately After Application Startup On 29/08/14 12:55, Bob Moran wrote: > The return code (rc) is SQLITE_OK, but "stmnt" is NULL (0) > > if I start the application and wait for at least 1 minute, everything works. You get NULL back from prepare with SQLITE_OK if the statement doesn't do anything. Examples are empty strings or comments. Chances are that is actually what is happening in your case. Roger _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ----------------------------------------------------------------------- Gunter Hick Software Engineer Scientific Games International GmbH Klitschgasse 2 – 4, A - 1130 Vienna, Austria FN 157284 a, HG Wien Tel: +43 1 80100 0 E-Mail: h...@scigames.at This e-mail is confidential and may well also be legally privileged. If you have received it in error, you are on notice as to its status and accordingly please notify us immediately by reply e-mail and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any person as to do so could be a breach of confidence. Thank you for your cooperation. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users