Closing database fails due to unfinalized statements

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Closing database fails due to unfinalized statements

Lothar Behrens
Hi,

I do have any unfinalized statements in my application when compiled  
on Windows, but not on Mac OS X.

Is there any difference I am missing to attent for ?

How could I see, wich statement (statement handle or SQL query to be  
used in that statement) is unfinalized ?

I do not have any differences in my compiler switches (defines).

Thanks

Lothar

-- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de
Lothar Behrens
Heinrich-Scheufelen-Platz 2
73252 Lenningen








_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Closing database fails due to unfinalized statements

Dan Kennedy-4

On Sep 16, 2008, at 4:44 PM, Lothar Behrens wrote:

> Hi,
>
> I do have any unfinalized statements in my application when compiled
> on Windows, but not on Mac OS X.
>
> Is there any difference I am missing to attent for ?
>
> How could I see, wich statement (statement handle or SQL query to be
> used in that statement) is unfinalized ?

Use sqlite3_next_stmt() to find unfinalized statements. sqlite3_sql()
to determine the SQL used to prepare them.

Dan.

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Closing database fails due to unfinalized statements

Jay Kreibich
In reply to this post by Lothar Behrens
On Tue, Sep 16, 2008 at 11:44:24AM +0200, Lothar Behrens scratched on the wall:

> Hi,
>
> I do have any unfinalized statements in my application when compiled  
> on Windows, but not on Mac OS X.
>
> Is there any difference I am missing to attent for ?
>
> How could I see, wich statement (statement handle or SQL query to be  
> used in that statement) is unfinalized ?
>
> I do not have any differences in my compiler switches (defines).

  Since Mac OS X now comes with a copy of the SQLite libs installed
  (that are somewhat out of date), be very careful you're linking against
  your development libs and not the system libs.

  IIRC, there was a behavior change a few versions back having to do
  with how unfinalized statements were handled when you attempt to
  close the database.
 
  If you're linking against a recent download on Windows and an older
  system lib on the Mac, that might explain the different behavior.

   -j

--
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Our opponent is an alien starship packed with atomic bombs.  We have
 a protractor."   "I'll go home and see if I can scrounge up a ruler
 and a piece of string."  --from Anathem by Neal Stephenson
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Closing database fails due to unfinalized statements

Lothar Behrens
Yes,

that's what I expected, since my debugging attempts into my sqlite  
library version always failed.
And it makes it clear why there are these differences.

Thanks

Lothar


Am 16.09.2008 um 17:00 schrieb Jay A. Kreibich:

> On Tue, Sep 16, 2008 at 11:44:24AM +0200, Lothar Behrens scratched  
> on the wall:
>> Hi,
>>
>> I do have any unfinalized statements in my application when compiled
>> on Windows, but not on Mac OS X.
>>
>> Is there any difference I am missing to attent for ?
>>
>> How could I see, wich statement (statement handle or SQL query to be
>> used in that statement) is unfinalized ?
>>
>> I do not have any differences in my compiler switches (defines).
>
>  Since Mac OS X now comes with a copy of the SQLite libs installed
>  (that are somewhat out of date), be very careful you're linking  
> against
>  your development libs and not the system libs.
>
>  IIRC, there was a behavior change a few versions back having to do
>  with how unfinalized statements were handled when you attempt to
>  close the database.
>
>  If you're linking against a recent download on Windows and an older
>  system lib on the Mac, that might explain the different behavior.
>
>   -j
>
> --
> Jay A. Kreibich < J A Y  @  K R E I B I.C H >
>
> "Our opponent is an alien starship packed with atomic bombs.  We have
> a protractor."   "I'll go home and see if I can scrounge up a ruler
> and a piece of string."  --from Anathem by Neal Stephenson
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

-- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de
Lothar Behrens
Heinrich-Scheufelen-Platz 2
73252 Lenningen








_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Closing database fails due to unfinalized statements

Lothar Behrens
In reply to this post by Dan Kennedy-4

Am 16.09.2008 um 16:51 schrieb Dan:

>
> On Sep 16, 2008, at 4:44 PM, Lothar Behrens wrote:
>
>> Hi,
>>
>> I do have any unfinalized statements in my application when compiled
>> on Windows, but not on Mac OS X.
>>
>> Is there any difference I am missing to attent for ?
>>
>> How could I see, wich statement (statement handle or SQL query to be
>> used in that statement) is unfinalized ?
>
> Use sqlite3_next_stmt() to find unfinalized statements. sqlite3_sql()
> to determine the SQL used to prepare them.

Thanks,

thats what I need for figuring out what's wrong.

Lothar

>
>
> Dan.
>
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

-- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de
Lothar Behrens
Heinrich-Scheufelen-Platz 2
73252 Lenningen








_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users