l but only a Stairway to Heaven says a
> lot about anticipated traffic volume.
>
>
>>-Original Message-
>>From: sqlite-users [mailto:sqlite-users-
>>boun...@mailinglists.sqlite.org] On Behalf Of Igor Korot
>>Sent: Thursday, 7 June, 2018 20:19
>>To
.
>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Igor Korot
>Sent: Thursday, 7 June, 2018 20:19
>To: SQLite mailing list
>Subject: Re: [sqlite] Reset the cursor
>
>Hi, Keith,
>
>On Tue, Jun 5, 2018 at
>
> ---
> The fact that there's a Highway to Hell but only a Stairway to Heaven says a
> lot about anticipated traffic volume.
>
>
>>-Original Message-
>>From: sqlite-users [mailto:sqlite-users-
>>boun...@mailinglists.sqlite.org] On Behalf Of Olivier Ma
ge-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Olivier Mascia
>Sent: Tuesday, 5 June, 2018 15:35
>To: SQLite mailing list
>Subject: Re: [sqlite] Reset the cursor
>
>> Le 5 juin 2018 à 22:47, Igor Korot a écrit :
>>
> Le 5 juin 2018 à 22:47, Igor Korot a écrit :
>
> As a side note: is it the case for all PRAGMA's command - they can be
> rewritten this way?
Full documentation for that is on page https://www.sqlite.org/pragma.html, see
the second title ("PRAGMA functions").
Citing in short: // PRAGMAs that
et, reset at 5
!
sqlite3_reset returns 0
Loop 2, After Reset
!
Loop 3, No Reset, Got SQLITE_DONE
!
sqlite3_reset returns 0
---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a
lot about anticipated traffic volume.
>-Original Message-
>From: sqlite-use
Hi, Olivier,
On Tue, Jun 5, 2018 at 3:15 PM, Olivier Mascia wrote:
>> Le 5 juin 2018 à 18:19, Igor Korot a écrit :
>>
>> My query is:
>>
>> std::string query = "PRAGMA foreign_key_list( \"%w\" )";
>>
>> Then I'm doing this:
>>
>> char *y = sqlite3_mprintf( query.c_str(), tableName );
>> res =
> Le 5 juin 2018 à 18:19, Igor Korot a écrit :
>
> My query is:
>
> std::string query = "PRAGMA foreign_key_list( \"%w\" )";
>
> Then I'm doing this:
>
> char *y = sqlite3_mprintf( query.c_str(), tableName );
> res = sqlite3_prepare_v2( m_db, y, -1, , 0 );
>
> and then the code follows.
>
>
, Got SQLITE_DONE
> !
> sqlite3_reset returns 0
>
> which is what I would expect ...
>
>
>
> ---
> The fact that there's a Highway to Hell but only a Stairway to Heaven says a
> lot about anticipated traffic volume.
>
>>-Original Message-----
>>From: s
to Heaven says a
lot about anticipated traffic volume.
>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Igor Korot
>Sent: Tuesday, 5 June, 2018 08:54
>To: SQLite mailing list
>Subject: Re: [sqlite] Reset the cur
esult of
>> sqlite3_errcode may mean something and may not
>
> Removing thay call made no difference.
> I am still getting 1 on the second iteration.
>
> Thank you.
>
>>
>>
>> ---
>> The fact that there's a Highway to Hell but only a Stairway to Heaven sa
he second iteration.
Thank you.
>
>
> ---
> The fact that there's a Highway to Hell but only a Stairway to Heaven says a
> lot about anticipated traffic volume.
>
>
>>-Original Message-
>>From: sqlite-users [mailto:sqlite-users-
>>boun...@mailinglists.
On 4 Jun 2018, at 8:09pm, Igor Korot wrote:
> The second cycle' sqlite3_step() returns 1, but immediately calling
> sqlite3_errcode() returns 0.
I don't like that.
You should almost never see a result code of 1. It's SQLite telling you
"Something went wrong but I don't know what.". It a bad
On 4 Jun 2018, at 7:15pm, Igor Korot wrote:
> Is my assumption correct that sqlite3_errcode() returning 0, indicate
> there was no error?
Correct. It might return
0 (SQLITE_OK == "no error")
1 to 99 (primary error code)
100 (SQLITE_ROW == "here's a row of data you asked for")
pated traffic volume.
>
>
>>-Original Message-
>>From: sqlite-users [mailto:sqlite-users-
>>boun...@mailinglists.sqlite.org] On Behalf Of Igor Korot
>>Sent: Monday, 4 June, 2018 12:15
>>To: SQLite mailing list
>>Subject: Re: [sqlite] Reset the cursor
&
2:15
>To: SQLite mailing list
>Subject: Re: [sqlite] Reset the cursor
>
>Keith,
>
>On Mon, Jun 4, 2018 at 12:59 PM, Keith Medcalf
>wrote:
>>
>> Yes, if it is 3.6.23.1 or earlier or the sqlite3 library was
>compiled with SQLITE_OMIT_AUTORESET you will get an SQLITE_
sqlite-users [mailto:sqlite-users-
>>boun...@mailinglists.sqlite.org] On Behalf Of Igor Korot
>>Sent: Monday, 4 June, 2018 11:50
>>To: SQLite mailing list
>>Subject: Re: [sqlite] Reset the cursor
>>
>>Keith,
>>
>>On Mon, Jun 4, 2018 at 12:35 PM, Keith Med
traffic volume.
>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Igor Korot
>Sent: Monday, 4 June, 2018 11:50
>To: SQLite mailing list
>Subject: Re: [sqlite] Reset the cursor
>
>Keith,
>
>On Mon,
;test
>
> Loop 1, no reset, reset at 5
> 1 2 3 4 5 !
> sqlite3_reset returns 0
>
> Loop 2, After Reset
> 1 2 3 4 5 6 7 8 9 10 !
>
> Loop 3, No Reset, Got SQLITE_DONE
> 1 2 3 4 5 6 7 8 9 10 !
> sqlite3_reset returns 0
I will try without this call tonight when I'm b
--
The fact that there's a Highway to Hell but only a Stairway to Heaven says a
lot about anticipated traffic volume.
>-----Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Keith Medcalf
>Sent: Monday, 4 June, 2018 11:25
>
om: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Keith Medcalf
>Sent: Monday, 4 June, 2018 11:06
>To: SQLite mailing list
>Subject: Re: [sqlite] Reset the cursor
>
>
>>Currently running w/MSVC 2010 under Win 8.1.
>
>>I also presu
>Currently running w/MSVC 2010 under Win 8.1.
>I also presume you are testing under the latest SQLite source?
Yes, I believe so ...
SQLite 3.24.0 2018-06-02 19:14:58
1ecb3aa13de5c8dc611b814ff34010de0bd90aae73d88aa37a59c4627be4alt2
Using GCC (MinGW-w64 8.1.0) on Windows 10 Pro for Workstations
---
> The fact that there's a Highway to Hell but only a Stairway to Heaven says a
> lot about anticipated traffic volume.
>
>
>>-Original Message-
>>From: sqlite-users [mailto:sqlite-users-
>>boun...@mailinglists.sqlite.org] On Behalf Of Igor Korot
>>Sent: S
lite3_reset returns 0
---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a
lot about anticipated traffic volume.
>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Igor Korot
>Sent: Sunday, 3 J
x,
On Mon, Jun 4, 2018 at 10:54 AM, x wrote:
> If the first loop exits with res3 == SQLITE_DONE then !result will be true
> and the second loop should process exactly the same (assuming underlying data
> is unchanged). I can’t see why the code below wouldn’t work although I’m
> confused by
ooops... last answer mail was on the wrong topic.
Am 04.06.2018 um 17:57 schrieb heribert:
I'm using also paged queries. I'm adding an OFFSET to the select-limit
query.
Works for me.
Am 04.06.2018 um 17:54 schrieb x:
If the first loop exits with res3 == SQLITE_DONE then !result will be
true
I'm using also paged queries. I'm adding an OFFSET to the select-limit
query.
Works for me.
Am 04.06.2018 um 17:54 schrieb x:
If the first loop exits with res3 == SQLITE_DONE then !result will be true and
the second loop should process exactly the same (assuming underlying data is
If the first loop exits with res3 == SQLITE_DONE then !result will be true and
the second loop should process exactly the same (assuming underlying data is
unchanged). I can’t see why the code below wouldn’t work although I’m confused
by the fact you say that sqlite3_step(stmt3) returns
To: SQLite mailing list
Subject: Re: [sqlite] Reset the cursor
x,
On Mon, Jun 4, 2018 at 9:42 AM, x wrote:
> int result = 0, res3 = SQLITE_OK;
> for( ; ; )
> {
> res3 = sqlite3_step( stmt3 );
>
e 4, 2018 3:33:54 PM
> To: SQLite mailing list
> Subject: Re: [sqlite] Reset the cursor
>
> Hi, Igor,
>
> On Mon, Jun 4, 2018 at 7:55 AM, Igor Tandetnik wrote:
>> On 6/4/2018 12:31 AM, Igor Korot wrote:
>>>
>>> Now I'd like the cursor in the records
is never true.
From: sqlite-users on behalf of
Igor Korot
Sent: Monday, June 4, 2018 3:33:54 PM
To: SQLite mailing list
Subject: Re: [sqlite] Reset the cursor
Hi, Igor,
On Mon, Jun 4, 2018 at 7:55 AM, Igor Tandetnik wrote:
> On 6/4/2018 12:31 AM, Igor Ko
ply to Igor's post.
Thank you.
>
>
>
>
> From: sqlite-users on behalf
> of Igor Korot
> Sent: Monday, June 4, 2018 1:52:05 PM
> To: SQLite mailing list
> Subject: Re: [sqlite] Reset the cursor
>
> Hi,
>
> On Mon, Jun 4,
Hi, Igor,
On Mon, Jun 4, 2018 at 7:55 AM, Igor Tandetnik wrote:
> On 6/4/2018 12:31 AM, Igor Korot wrote:
>>
>> Now I'd like the cursor in the recordset of the "stmt" to go to the record
>> 1
>> so I can process those records again.
>>
>> I thought that this will be a job of sqlite_reset(), but
:52:05 PM
To: SQLite mailing list
Subject: Re: [sqlite] Reset the cursor
Hi,
On Mon, Jun 4, 2018 at 7:54 AM, Igor Korot wrote:
> Hi, Clemens et al,
>
> On Mon, Jun 4, 2018 at 1:23 AM, Clemens Ladisch wrote:
>> Igor Korot wrote:
>>> res = sqlite3_step( stmt );
>>
Igor, if sqlite3_step is successful it returns SQLITE_ROW which is 1.
From: sqlite-users on behalf of
Igor Korot
Sent: Monday, June 4, 2018 1:52:05 PM
To: SQLite mailing list
Subject: Re: [sqlite] Reset the cursor
Hi,
On Mon, Jun 4, 2018 at 7:54 AM, Igor
On 6/4/2018 12:31 AM, Igor Korot wrote:
Now I'd like the cursor in the recordset of the "stmt" to go to the record 1
so I can process those records again.
I thought that this will be a job of sqlite_reset(), but when I called
it and started re-processing the recordset I got SQLITE_DONE on the
Hi,
On Mon, Jun 4, 2018 at 7:54 AM, Igor Korot wrote:
> Hi, Clemens et al,
>
> On Mon, Jun 4, 2018 at 1:23 AM, Clemens Ladisch wrote:
>> Igor Korot wrote:
>>> res = sqlite3_step( stmt );
>>>
>>> Now I'd like the cursor in the recordset of the "stmt" to go to the record 1
>>> so I can
Hi, Clemens et al,
On Mon, Jun 4, 2018 at 1:23 AM, Clemens Ladisch wrote:
> Igor Korot wrote:
>> res = sqlite3_step( stmt );
>>
>> Now I'd like the cursor in the recordset of the "stmt" to go to the record 1
>> so I can process those records again.
>
> Strictly speaking, it is not possible
Igor Korot wrote:
> res = sqlite3_step( stmt );
>
> Now I'd like the cursor in the recordset of the "stmt" to go to the record 1
> so I can process those records again.
Strictly speaking, it is not possible to go back in the _same_ cursor.
You'd have to execute the query again (by calling
Hi, All,
After executing the following:
int res = sqlite3_prepare_v2( ... stmt );
while( ; ; )
{
res = sqlite3_step( stmt );
if( res == SQLITE_ROW )
{
// process the record
}
else if( res == SQLITE_DONE )
break;
else
{
// error procressing
}
40 matches
Mail list logo