On Thu, Jan 13, 2011 at 1:07 AM, Simon Slavin <slav...@bigfraud.org> wrote:
> > On 12 Jan 2011, at 9:57pm, Max Vlasov wrote: > > > Simon, your reply led me to the following sequence: > > - I know the rowid of the record I'm changing. I remember all integers > (and > > all other data) I'm going to change in the Update query (it' > comparatively > > easy task) > > - I check this rowid after the change. If it exists, the record did not > > change the rowid and if it does not I form SELECT .. where rowid= or > > rowid=.. containing all the integers I used and compare the rest of the > data > > only with this result set. If there's only single match, this is the > answer, > > but if not ... I should think about it :) > > > > Does it sound reasonable? > > It will deal with most cases, but it can still be fooled by creative use of > TRIGGERs, or by bad coincidences in the numbers stored. A question worth > asking might be why you need to maintain these rowids. If you're just > letting your user change whatever data they want, why are you bothering to > keep track of rowids ? > > Thanks to the portability of sqlite, sometimes I just want to do things easy at the fingers. So you have a grid, you walk on it, change values, sometimes the program says "sorry, you can not do this", in other cases it just does what it was asked for. And for for maintaining such simplicity one sometimes have to implement a tricky algorithm like this :) Max _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users