[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-02 Thread James K. Lowden
On Tue, 1 Mar 2016 17:13:29 + a a wrote: > I want to check after a while if the connection is allready closed or > not for the simple reason not to reopen the database but if is open > to run a query or if it is closed to reopen the database and then run > the query. I don't blame you for th

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread Robert Weiss
inglists.sqlite.org] On Behalf Of a a > Sent: Tuesday, 1 March, 2016 10:13 > To: SQLite mailing list > Subject: Re: [sqlite] How to check if connection to main database is still > open or closed before new query ? > > Let me explain it better cause i got confused and i am a? newbi

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread a a
list' Subject: Re: [sqlite] How to check if connection to main database is still open or closed before new query ? I don't think this will work. sqlite3_open and sqlite3_close return a status which, if they worked, is SQLITE_OK. A simpler solution might be to s

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread Andy Ling
e.org on behalf of Simon Slavin Sent: Tuesday, March 1, 2016 7:01 PM To: SQLite mailing list Subject: Re: [sqlite] How to check if connection to main database is still open or closed before new query ? On 1 Mar 2016, at 4:59pm, a a wrote: > the sqlite3_close() &l

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread a a
1 PM To: SQLite mailing list Subject: Re: [sqlite] How to check if connection to maindatabase is still open or closed before new query ? On 1 Mar 2016, at 4:59pm, a a wrote: > the sqlite3_close() <--- needs one argument if i pass sqlite3_close(NULL) it > actually c

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread Simon Slavin
On 1 Mar 2016, at 4:59pm, a a wrote: > the sqlite3_close() <--- needs one argument if i pass sqlite3_close(NULL) it > actually closes again a closed connection ? No. If you pass it null it realises that the connection is closed and does nothing. Simon.

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread a a
ion From: sqlite-users-bounces at mailinglists.sqlite.org on behalf of Simon Slavin Sent: Tuesday, March 1, 2016 6:50 PM To: SQLite mailing list Subject: Re: [sqlite] How to check if connection to main database is still open or closed before new qu

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread Simon Slavin
On 1 Mar 2016, at 4:47pm, a a wrote: > Nope the previous was errored it doesn`t actually check it if the ppDB is > allready closed :/ > It works only if it is open and not closed otherwise if sqlite3_close(ppDB) > was previously called it sees it as open again sqlite3_close() ignores connect

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread a a
-users-bounces at mailinglists.sqlite.org on behalf of Simon Slavin Sent: Tuesday, March 1, 2016 6:33 PM To: SQLite mailing list Subject: Re: [sqlite] How to check if connection to main database isstill open or closed before new query ? On 1 Mar 2016, at 4:31pm, a a wrote: > Thank you Si

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread a a
iling list Subject: Re: [sqlite] How to check if connection to main database is still open or closed before new query ? On 1 Mar 2016, at 4:31pm, a a wrote: > Thank you Simon indeed what i was looking for Please test it first. I can't test C programs here at work and I can't find

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread Simon Slavin
On 1 Mar 2016, at 4:31pm, a a wrote: > Thank you Simon indeed what i was looking for Please test it first. I can't test C programs here at work and I can't find documentation that it works. Simon.

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread a a
Thank you Simon indeed what i was looking for From: sqlite-users-bounces at mailinglists.sqlite.org on behalf of Simon Slavin Sent: Tuesday, March 1, 2016 6:17 PM To: SQLite mailing list Subject: Re: [sqlite] How to check if connection to main database

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread Simon Slavin
On 1 Mar 2016, at 4:02pm, a a wrote: > I am trying to find if there is a return value of true false or anything that > can tell me that a connection to sqlite database is open or close > > Can you tell me which function is appropiate for this reason ? If I understand correctly, SQLite sets th

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread a a
I am trying to find if there is a return value of true false or anything that can tell me that a connection to sqlite database is open or close Can you tell me which function is appropiate for this reason ? Thank you in advance

[sqlite] How to check if connection to main database is still open or closed before new query ?

2016-03-01 Thread Keith Medcalf
te.org [mailto:sqlite-users- > bounces at mailinglists.sqlite.org] On Behalf Of a a > Sent: Tuesday, 1 March, 2016 10:13 > To: SQLite mailing list > Subject: Re: [sqlite] How to check if connection to main database is still > open or closed before new query ? > > Let me explain it