You cannot create a trigger which crosses between databases because the system cannot know that the database will be attached when the trigger fires. Triggers are part of the consistency guarantee, so this is bad.
It would be interesting to have something like "CREATE TEMPORARY TRIGGER ... " which would only exist so long as the referenced databases we attached. Then you could just create your temporary triggers in the same code which attaches your databases. Likewise for views, perhaps. -scott On Mon, Apr 21, 2008 at 2:41 PM, Federico Granata <[EMAIL PROTECTED]> wrote: > Hi, I'm trying to create in the main db a trigger on "after insert on > ATTACHED_DB.TABLE" but I get an error > "SQL error: trigger TEST_TRIGGER cannot reference objects in database > ATTACHED_DB" > > Can I obtain TABLE_1 in the attached db and TABLE_2 and TRIGGER (who read > from TABLE_1 and write to TABLE_2) in the main db ? > > Tanks a lot and sorry for my bad english. > _______________________________________________ > 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