On 8 Mar 2017, at 2:16pm, don v nielsen <donvniel...@gmail.com> wrote:

> Vermes, I'm late to the party but would still like to comment. The problem is 
> the ruby code, not sqlite. The following is what you coded in the Ruby:
> 
>    db.execute("select szamla,megnevezes from proba") do |row|
> 
> In some shape or fashion, the result set is getting mangled by the update.

That makes sense in terms of how SQLite works.  Your UPDATE is modifying the 
rows from the database while the SELECT is trying to retrieve them.  Because 
updating the rows causes them to move about the SELECT gets confused about how 
far it has got.

Both the solutions DVN suggested prevent this by causing Ruby to gather all the 
results first, then to apply any UPDATEs.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to