On Sat, 8 Dec 2007 23:31:16 -0800 (PST), Robert Smith <[EMAIL PROTECTED]> wrote:
>I am trying to implement an embedded application using SQLite. I need to >modify data through views. The update, insert, or delete operations may >refer to a computed column or a built-in function in a view. I experienced >problems. I am wondering if SQLite can support features of modifying date >through views. You can't update a view directly: http://www.sqlite.org/lang_createview.html "You cannot COPY, DELETE, INSERT or UPDATE a view. Views are read-only in SQLite. However, in many cases you can use a TRIGGER on the view to accomplish the same thing." The triggers meant are INSTEAD OF triggers: http://www.sqlite.org/lang_createtrigger.html sql-statement ::= CREATE [TEMP | TEMPORARY] TRIGGER [IF NOT EXISTS] trigger-name INSTEAD OF database-event ON [database-name .] view-name trigger-action Your trigger-action can do about anything. >Thanks, >Robert HTH -- ( Kees Nuyt ) c[_] ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------