One added note: My GUI is using QT4, where in this case the SQL text goes 
something like:

        QString qstr = "select id, step, temp from protocols where id = %1";
        qstr = qstr.arg(id);
        char * str = (char*)qPrintable(qstr);
        sqlite3_prepare_v2( db, str, qstr.Length+1, &stmt, NULL)

-----Original Message-----
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Simon Slavin
Sent: Wednesday, September 03, 2014 12:51 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Cannot retrieve SQLite Db Data Immediately After 
Application Startup


> On 3 Sep 2014, at 5:24am, Bob Moran <bmo...@cicaccess.com> wrote:
> 
> 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?

Are you using a SQLite library or including the amalgamation source code ?

If you're using the SQLite source are you using any SQLite compiler defs ?

Which compiler are you using ?

Simon.
_______________________________________________
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

Reply via email to