[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-11 Thread Bart Smissaert
reff: [sqlite] Can SQLite know from the statement string if it is row > producing or not? > > I am interested to know from the statement string if the statement is > invalid, row producing (could produce rows) or non row producing. I know > sqlite3_prepare16_v2 can see if the statemen

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-11 Thread Hick Gunter
von Bart Smissaert Gesendet: Freitag, 08. J?nner 2016 21:28 An: General Discussion of SQLite Database Betreff: [sqlite] Can SQLite know from the statement string if it is row producing or not? I am interested to know from the statement string if the statement is invalid, row producing (could

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread mstayros
On 09/01/2016 07:11 ??, Bart Smissaert wrote: >> Presumably this is something the original poster wants. > Yes, need to know if the statement >could< produce rows. > > RBS > > On Sat, Jan 9, 2016 at 4:57 PM, Simon Slavin wrote: > >> On 9 Jan 2016, at 1:18pm, Bart Smissaert wrote: >> but

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Stephan Beal
On Sat, Jan 9, 2016 at 5:57 PM, Simon Slavin wrote: > > On 9 Jan 2016, at 1:18pm, Bart Smissaert wrote: > > >> but only after at least one sqlite3_step() occurred. > > > > It will work before any step, but indeed the statement needs to be > prepared. > > I need to know before stepping, but it

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Bart Smissaert
> Presumably this is something the original poster wants. Yes, need to know if the statement >could< produce rows. RBS On Sat, Jan 9, 2016 at 4:57 PM, Simon Slavin wrote: > > On 9 Jan 2016, at 1:18pm, Bart Smissaert wrote: > > >> but only after at least one sqlite3_step() occurred. > > > >

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Simon Slavin
On 9 Jan 2016, at 1:18pm, Bart Smissaert wrote: >> but only after at least one sqlite3_step() occurred. > > It will work before any step, but indeed the statement needs to be prepared. > I need to know before stepping, but it can do that. For a SELECT which returns no rows I presume it

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread R Smith
On 2016/01/09 1:30 PM, Clemens Ladisch wrote: > Bart Smissaert wrote: >> I am interested to know from the statement string if the statement is >> invalid, row producing (could produce rows) or non row producing. > says about >

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Bart Smissaert
> but only after at least one sqlite3_step() occurred. It will work before any step, but indeed the statement needs to be prepared. I need to know before stepping, but it can do that. RBS On Sat, Jan 9, 2016 at 12:57 PM, R Smith wrote: > > > On 2016/01/09 1:30 PM, Clemens Ladisch wrote: > >>

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Bart Smissaert
> sqlite3_column_count Ah, yes that looks good, will try that one. RBS On Sat, Jan 9, 2016 at 11:30 AM, Clemens Ladisch wrote: > Bart Smissaert wrote: > > I am interested to know from the statement string if the statement is > > invalid, row producing (could produce rows) or non row

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Clemens Ladisch
Bart Smissaert wrote: > I am interested to know from the statement string if the statement is > invalid, row producing (could produce rows) or non row producing. says about sqlite3_column_count(): | Return the number of columns in the result set

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Bart Smissaert
With row producing I mean you will get return values, so mainly select statements, but also certain pragma's and for example the explain statement. In my thinking I would classify INSERT INTO table1 VALUES(1) as non row producing. RBS On Sat, Jan 9, 2016 at 9:45 AM, Luuk wrote: > > > On

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Luuk
On 08-01-16 21:27, Bart Smissaert wrote: > I am interested to know from the statement string if the statement is > invalid, row producing (could produce rows) or non row producing. I know > sqlite3_prepare16_v2 can see if the statement is valid or not but how about > the other 2? > I can do this

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-08 Thread Bart Smissaert
I am interested to know from the statement string if the statement is invalid, row producing (could produce rows) or non row producing. I know sqlite3_prepare16_v2 can see if the statement is valid or not but how about the other 2? I can do this in code no problem, but it may not always be 100%