--- Chase <[EMAIL PROTECTED]> wrote: > here's the deal. i want this trigger to fire -- and insert valid guids > into a table -- even outside the context of my app. > > using sqlite3_create_function(), i can create a sort of temporary > function that only works from with my app (or other running instances > of my app), but i want it to fire even if someone opens the database > file in some other 3rd-party editor and inserts/updates/deletes the > table with the trigger. > > well... it DOES fire, but when it does, it won't know what newuuid() means. > > so i guess my question should be.... how to i **INSTALL/EMBED** my > custom function **into** the database file.
Not much you can do with the standard SQLite because it lacks a built-in stored procedure language, and a facility to automatically initialize stuff based on information in a table. You can hack your own version of SQLite that upon creating a connection it automatically loads functions written in an interpreted language from a specific table. But this does not help you if others choose not to run your specific version of SQLite to examine the database. For something fairly close to what you're looking for, see Christian Werner's sqlite ODBC driver: http://www.ch-werner.de/sqliteodbc/ Specifically, read up on see then DSN option LoadExt for loadable extensions. Also take a look at its sqlite+tcc facility for on-the-fly compilation of C functions for use in SQLite. ____________________________________________________________________________________ Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

