Good day,

I'm new to SQL lite too, but  I don't see the point of reset for a
one-off insert query or one that gets finalized right away.

Insert has no row set, so you aren't about to reset and step through
the rowset again.

As always, I'm willing to be enlightened....  My code runs successive
inserts without an apparent problem so far.

Adam

On Fri, Feb 6, 2009 at 3:57 PM, Stephen Abbamonte
<st...@tornadostudios.com> wrote:
> Because the SDK docs tell me to.
> http://www.sqlite.org/c3ref/step.html
>
>
> " SQLITE_DONE means that the statement has finished executing successfully.
> sqlite3_step() should not be called again on this virtual machine without
> first calling sqlite3_reset() to reset the virtual machine back to its
> initial state."
>
>
>
> -----Original Message-----
> From: sqlite-users-boun...@sqlite.org
> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Adam DeVita
> Sent: Friday, February 06, 2009 2:57 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Trying to INSERT rows into a table
>
> Why are you calling reset after step?
>
> regards,
> Adam
>
> On Fri, Feb 6, 2009 at 3:51 PM, Stephen Abbamonte
> <st...@tornadostudios.com> wrote:
>> Hi all I am using SQLite3 and running into a bit of a snag.  I have a
>> Database with an empty table and I am calling a series of INSERT commands
>> during the execution of my program but it seems that each call is
>> overwriting the first row in the table. I have tried the table with and
>> without a PRIMARY KEY and I get the same result.  The call to sqlite3_step
>> with my INSERT command returns SQLITE_DONE so I call  sqlite3_reset first
>> then I call sqlite3_finalize.             Then I prepare a new statement
> and
>> do these steps again. If anyone can help I would greatly appreciate it.
>> Thanks.
>>
>>
>>
>> Stephen Abbamonte
>>
>>  Software Engineer
>>
>>  Tornado Studios
>>
>>
>>
>>
>>
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>
>
>
> --
> VerifEye Technologies Inc.
> 905-948-0015x245
> 7100 Warden Ave, Unit 3
> Markham ON, L3R 8B5
> Canada
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
VerifEye Technologies Inc.
905-948-0015x245
7100 Warden Ave, Unit 3
Markham ON, L3R 8B5
Canada
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to