[AOLSERVER] nssqlite3 troubles

2008-02-07 Thread Jeff Rogers
Hi all, I'm using the nssqlite3 driver for my latest experiment and found a serious limitation in it: you cannot execute a select statement that returns no rows. (at least not with select or 0or1row; you could probably hack it with exec but that would be annoying and is supposed to be

Re: [AOLSERVER] nssqlite3 troubles

2008-02-07 Thread Stephen Deasey
On Feb 7, 2008 9:32 AM, Jeff Rogers [EMAIL PROTECTED] wrote: The problem is straightforward - the driver checks how many rows are returned after executing a statement; 0 returns NS_DML and 0 returns NS_ROWS. 'ns_db select' and '0or1row' expect NS_ROWS results, even if there are no rows to be

Re: [AOLSERVER] nssqlite3 troubles

2008-02-07 Thread dhogaza
And then there's nsdb - I think the more specific selectProc should be tried first for select operations, but since it's been this way for a while, would changing this break some other drivers (where the selectProc has never been called, or tested)? The postgres driver is at least aware of

Re: [AOLSERVER] nssqlite3 troubles

2008-02-07 Thread Jeff Rogers
Stephen Deasey wrote: sqlite3_stmt *st; sqlite3_prepare_v2(handle, sql, length, st, tail) if (sqlite3_column_count(st) == 0) { /* DML */ } Ah, that's much cleaner! I guess late at night I overlooked the sqlite3_column* set of functions. Using sqlite3_column_name

Re: [AOLSERVER] nssqlite3 troubles

2008-02-07 Thread dhogaza
[EMAIL PROTECTED] wrote: The select proc is only in the pg driver in order to support some ancient AOLserver 2 functionality that I doubt anyone else uses any more. Then should it be removed? (in someone's copious free time...) Only issue would be legacy sites that may use it. Of course,

Re: [AOLSERVER] nssqlite3 troubles

2008-02-07 Thread Tom Jackson
On Thursday 07 February 2008 11:07, Jeff Rogers wrote: [EMAIL PROTECTED] wrote: The select proc is only in the pg driver in order to support some ancient AOLserver 2 functionality that I doubt anyone else uses any more. Then should it be removed? (in someone's copious free time...) It

Re: [AOLSERVER] nssqlite3 troubles

2008-02-07 Thread dhogaza
Using sqlite3_column_name could be a better approach for DbBindRow also, rather than relying on the per-row callback being called. Although it may not matter much - does anyone care about what columns are returned if there are no rows? Well, should be faster, since the column names are

Re: [AOLSERVER] nssqlite3 troubles

2008-02-07 Thread Jeff Rogers
[EMAIL PROTECTED] wrote: The select proc is only in the pg driver in order to support some ancient AOLserver 2 functionality that I doubt anyone else uses any more. Then should it be removed? (in someone's copious free time...) It shouldn't appear in your sqllite3 driver, IMO. Could you