> *Throws DBconcurrency violation. Affected rows 0 instead of 1.*

I use updatable views all the time, via "instead of" triggers, as you 
described. They work well.

I think your problem may be that SQLite doesn't acknowledge changes via the 
changes() SQL function and sqlite3_changes() C function, which I suspect your 
wrapper is using.

On the SQLite web site:
http://www.sqlite.org/lang_corefunc.html

>> changes()    The changes() function returns the number of database rows that 
>> were changed or inserted or deleted by the most recently completed INSERT, 
>> DELETE, or UPDATE statement, exclusive of statements in lower-level 
>> triggers. The changes() SQL function is a wrapper around the 
>> sqlite3_changes() C/C++ function and hence follows the same rules for 
>> counting changes.

http://www.sqlite.org/c3ref/changes.html

>> Changes to a view that are simulated by an INSTEAD OF trigger are not 
>> counted. Only real table changes are counted.


The changes are in fact made, but those avenues for checking don't work. I'm 
tempted to label this as a bug in SQLite, since I see no reason for the 
limitation.

I hope this helps,
Tom

Tom Brodhurst-Hill
BareFeetWare

--
iPhone/iPad/iPod and Mac software development, specialising in databases
[email protected]
--
Follow us on Twitter: http://twitter.com/barefeetware/
Like us on Facebook: http://www.facebook.com/BareFeetWare

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to