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