Re: [sqlite] Querying column collation setting via SQL

2012-05-15 Thread Simon Slavin
On 15 May 2012, at 11:25pm, Jeremy Stephens wrote: > Is it possible to find the collation setting of a column via SQL? I've > noticed there is a way to do this using the C API (by using > sqlite3_table_column_metadata), but short of parsing the CREATE TABLE command > found in sqlite_master (

[sqlite] Querying column collation setting via SQL

2012-05-15 Thread Jeremy Stephens
Hi all, Is it possible to find the collation setting of a column via SQL? I've noticed there is a way to do this using the C API (by using sqlite3_table_column_metadata), but short of parsing the CREATE TABLE command found in sqlite_master (which does show the COLLATE info), I can't figure ou

Re: [sqlite] finalizing all statements before closing connection

2012-05-15 Thread Simon Slavin
On 15 May 2012, at 9:03pm, "Jay A. Kreibich" wrote: > That's missing the point. You're never supposed to get there. > Having unaccounted for statements when you close the database is > essentially a memory leak. You've got data structures the > application lost track of and didn't clean up

Re: [sqlite] finalizing all statements before closing connection

2012-05-15 Thread Jay A. Kreibich
On Tue, May 15, 2012 at 08:49:50PM +0100, Simon Slavin scratched on the wall: > > On 15 May 2012, at 8:38pm, Baruch Burstein wrote: > > > I am working on a C++ wrapper for sqlite. It > > is the wrapper's user's responsibility to make sure no statement objects > > still exist before the databas

Re: [sqlite] finalizing all statements before closing connection

2012-05-15 Thread Jay A. Kreibich
On Tue, May 15, 2012 at 10:38:29PM +0300, Baruch Burstein scratched on the wall: > On Tue, May 15, 2012 at 10:34 PM, Jay A. Kreibich wrote: > > > On Tue, May 15, 2012 at 10:17:41PM +0300, Baruch Burstein scratched on > > the wall: > > > Which of the following should I be running right before call

Re: [sqlite] finalizing all statements before closing connection

2012-05-15 Thread Simon Slavin
On 15 May 2012, at 8:38pm, Baruch Burstein wrote: > I am working on a C++ wrapper for sqlite. It > is the wrapper's user's responsibility to make sure no statement objects > still exist before the database object gets destroyed. This is just a > precaution. I am surprised that doing _close()

Re: [sqlite] finalizing all statements before closing connection

2012-05-15 Thread Baruch Burstein
On Tue, May 15, 2012 at 10:34 PM, Jay A. Kreibich wrote: > On Tue, May 15, 2012 at 10:17:41PM +0300, Baruch Burstein scratched on > the wall: > > Which of the following should I be running right before calling > > sqlite3_close? > > > > while(stmt = sqlite3_next_stmt(db, stmt)) > > sqlite

Re: [sqlite] finalizing all statements before closing connection

2012-05-15 Thread Simon Slavin
On 15 May 2012, at 8:17pm, Baruch Burstein wrote: > Which of the following should I be running right before calling > sqlite3_close? > > while(stmt = sqlite3_next_stmt(db, stmt)) >sqlite3_finalize(stmt); You would, of course, have to initialise your value for stmt before entering that

Re: [sqlite] finalizing all statements before closing connection

2012-05-15 Thread Jay A. Kreibich
On Tue, May 15, 2012 at 10:17:41PM +0300, Baruch Burstein scratched on the wall: > Which of the following should I be running right before calling > sqlite3_close? > > while(stmt = sqlite3_next_stmt(db, stmt)) > sqlite3_finalize(stmt); > > while(stmt = sqlite3_next_stmt(db, NULL)) >

[sqlite] finalizing all statements before closing connection

2012-05-15 Thread Baruch Burstein
Which of the following should I be running right before calling sqlite3_close? while(stmt = sqlite3_next_stmt(db, stmt)) sqlite3_finalize(stmt); while(stmt = sqlite3_next_stmt(db, NULL)) sqlite3_finalize(stmt); I am not sure which will have the desired effect. -- Programming tod

[sqlite] Please review this email to sqlite's mailing list

2012-05-15 Thread Charles Samuels
I'm using sqlite in addition to another database ("otherdb") storing data in a specific manner. I'm trying to keep atomicity of my disk commits. It can take several minutes for otherdb to commit, and while it commits it can already start accumulating data for a future transaction. Some of the

[sqlite] Announcement: DRH to be in Munich, Germany July 3rd, 2012

2012-05-15 Thread Stephan Beal
Hello, all, (i'm writing this post on behalf of/in conjunction with Richard, cross-posting to the sqlite and Fossil mailing lists...) Management summary: DRH will be in Munich, Germany on July 3rd. Would you like to join him? (If not, you can tap delete now.) Details: Richard Hipp will be in Mu

Re: [sqlite] Compiler warnings with 3.7.12

2012-05-15 Thread Black, Michael (IS)
Same thing on mingw 4.5.1 It's not harmful but this cleans it up and should be harmless also. #undef popen #define popen(a,b) _popen((a),(b)) #undef pclose #define pclose(x) _pclose(x) Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating U

Re: [sqlite] how to write line feed "\n\r" when output a txt file

2012-05-15 Thread Jean-Denis MUYS
On 14 mai 2012, at 21:03, Kees Nuyt wrote: > On Mon, 14 May 2012 05:41:08 +, YAN HONG YE > wrote: > […] > By the way, common lineendings are platform dependent > MS Windows: \r\n = 0x0D 0x0A = cr lf > Unix/Linux: \n= 0x0A = lf > Apple Mac: \r= 0x0D = cr > This is incorrect. Fi