Thank you guys for the responses. Great info to consider. I was quite
confused but the fact that by waiting some length of time after startup of
the app, that everything appeared to work. I repeated ran the troublesome
call (without stopping the app), and it would work the 6-7 times of making
the c
Bob Moran wrote on: Friday, September 05, 2014 12:07 AM
> On Wed, Sep 3, 2014 at 1:29 PM, Nelson, Erik - 2 <
> erik.l.nel...@bankofamerica.com> wrote:
>
> > Bob Moran wrote on Wednesday, September 03, 2014 12:45 PM
> > >
> > > One added note: My GUI is using QT4, where in this case the SQL
> text
Another solution would be moving the call to qprintable inside the
prepare_v2 call:
sqlite3_prepare_v2( db, qPrintable(qstr) , qstr.length()+1, &stmt, NULL)
I don't know if this is your case but please note that I think this way
would not handle well some Unicode strings (the ones for which utf8 a
You could use QString::constData which returns a pointer to internal data
to the string encoded in utf16 and then change the call to
sqlite3_prepare16_v2...
Il 05/set/2014 06:08 "Bob Moran" ha scritto:
> Erik,
> Are you implying that I must copy the text returned by qPrintable(sql) to a
> safe lo
Erik,
Are you implying that I must copy the text returned by qPrintable(sql) to a
safe location before calling a method that uses it? I thought that the
string would be valid until I return from the routine.
Bob Moran
On Wed, Sep 3, 2014 at 1:29 PM, Nelson, Erik - 2 <
erik.l.nel...@bankofamerica
Bob Moran wrote on Wednesday, September 03, 2014 12:45 PM
>
> 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*)qPrin
retrieve SQLite Db Data Immediately After
Application Startup
On 3 Sep 2014, at 5:18pm, Bob Moran wrote:
> I am using the amalgamation. Simply added the SQLITE3.c and .H files to my
> project. I am developing with VisualGDB (VS 2010) cross compiling (building
> on Windows 7, runni
r.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 Da
On 3 Sep 2014, at 5:18pm, Bob Moran wrote:
> I am using the amalgamation. Simply added the SQLITE3.c and .H files to my
> project. I am developing with VisualGDB (VS 2010) cross compiling (building
> on Windows 7, running on RPI). No added compiler directives (hopefully, that
> is the problem
-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, a
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
> On 3 Sep 2014, at 5:24am, Bob Moran 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 b
t: 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 NUL
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 comm
Application running on Linux Debian (Raspberry Pi. I am using QT4 and
SQLite3.c V3.8.6 embedded in the application).using VisualGDB cross
compiler running in RPI. The problem occurs on first startup.
With the database open via:
sqlite3_open_v2("/home/pi/mydatabase.db", &db, SQLITE_OPEN_READWRITE,
15 matches
Mail list logo