Re: [sqlite] A question about sqlite : How could i get the rows affected by current sql statement ?

2010-03-02 Thread Pavel Ivanov
> This function returns the number of row changes caused by INSERT, UPDATE or >> DELETE statements since the database connection was opened. >> > > Either you're or this sentence on the site should be changed (in the final > part) Oops, missed the last part. But it seems not very useful for OP

Re: [sqlite] A question about sqlite : How could i get the rows affected by current sql statement ?

2010-03-02 Thread Max Vlasov
On Tue, Mar 2, 2010 at 6:36 PM, Pavel Ivanov wrote: > OK, now I see the problem, but sqlite3_total_changes() will not help > here too - it behaves the same way as sqlite3_changes(), it doesn't > accumulate changes over several statements. > Hmm... are you sure about this? A

Re: [sqlite] A question about sqlite : How could i get the rows affected by current sql statement ?

2010-03-02 Thread Pavel Ivanov
OK, now I see the problem, but sqlite3_total_changes() will not help here too - it behaves the same way as sqlite3_changes(), it doesn't accumulate changes over several statements. So without introducing some difference between SELECT queries and any data-changing queries in your program you won't

Re: [sqlite] A question about sqlite : How could i get the rows affected by current sql statement ?

2010-03-02 Thread Max Vlasov
On Mon, Mar 1, 2010 at 6:31 PM, Pavel Ivanov wrote: > sqlite3_changes() is exactly what you should use in this case. And I > didn't understand why did you find it unsuitable for you? > > Pavel > I think I understand his confusion. Imagine if for some reason you don't know

Re: [sqlite] A question about sqlite : How could i get the rows affected by current sql statement ?

2010-03-01 Thread Pavel Ivanov
sqlite3_changes() is exactly what you should use in this case. And I didn't understand why did you find it unsuitable for you? Pavel On Mon, Mar 1, 2010 at 8:22 AM, yangchen wrote: > HI, > > How could i get the rows affected by current sql statement ? > >

[sqlite] A question about sqlite : How could i get the rows affected by current sql statement ?

2010-03-01 Thread yangchen
HI, How could i get the rows affected by current sql statement ? "sqlite3_changes" can only get the rows affected by the most recently sql statement which really affect rows. But i don't know whether current sql statement can affect rows. For example: 1) First ,i open the database connection.