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: Thursday, 7 June, 2018 2
fic 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: SQLite mailing list
>Subject: Re: [sqlite] Reset the cursor
>
>Hi, Keith,
>
>On Tue, Jun 5
ust missed
the announcement?
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...@mai
ume.
>-Original Message-
>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,
> 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
test
Loop 1, no reset, 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
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 = s
> 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, &stmt, 0 );
>
> and then the code follows.
> so the idea is that you get the return code of the API call ...
>>>> if and only if this is a failure (not in [SQLITE_OK, SQLITE_ROW,
>>SQLITE_DONE]) should you even look at the sqlite3_errcode
>>>> if the original API return code was SQLITE_MISUSE then the result
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: Tuesday, 5 June, 2018 08:54
>To: SQLite mailing list
>Subject:
E then the result 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 S
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...@mailingl
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")
101
ot about anticipated 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
018 12: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 SQ
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, Jun 4, 2018 at 12:35 PM, Keit
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 11:50
>To: SQLite mailing list
>Subject: Re: [sqlite] Reset the cursor
>
>Keith,
>
>On
2 MinGW [D:\work]
>>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
7 8 9 10 !
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-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Keith Medcalf
>S
gt;From: 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
>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
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 B
t
1 2 3 4 5 6 7 8 9 10 !
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-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf
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 the
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 a
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
unchanged).
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 SQLITE_
: 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 recordset of
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, J
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 w
: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
ve
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 process
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 to
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 sqli
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