Re: [sqlite] Attach a database dynamically if not already available within a trigger

2010-03-16 Thread Kees Nuyt
On Mon, 15 Mar 2010 18:52:26 -0400, andy wrote: >Hello >I am hoping someone can help with the following problem. > >- I want to create a log of all changes to tables in a database. >- I would like to keep the log table in a separate database to the >main data files >-

Re: [sqlite] Attach a database dynamically if not already available within a trigger

2010-03-15 Thread andy
Thank you. Dont worry readers Im not trying anything "007" Rather, I have variety of separate utilities that insert/update/ delete records across several database and hoped to use triggers to log changes to a single place. By embeding the attach statement as part of the trigger (i.e

Re: [sqlite] Attach a database dynamically if not already available within a trigger

2010-03-15 Thread Simon Slavin
On 15 Mar 2010, at 10:52pm, andy wrote: > How can I embed the 'attach" command within the trigger statement so > that the log database is attached if it is not already available? Why not just attach it outside the TRIGGER ? Simon. ___ sqlite-users

[sqlite] Attach a database dynamically if not already available within a trigger

2010-03-15 Thread andy
Hello I am hoping someone can help with the following problem. - I want to create a log of all changes to tables in a database. - I would like to keep the log table in a separate database to the main data files - I plan to use triggers to capture changes and insert them into the log table.

Re: [sqlite] Attach a database dynamically if not already available within a trigger

2010-03-15 Thread Pavel Ivanov
> How can I embed the 'attach" command within the trigger statement so > that the log database is attached if it is not already available? AFAIK, this is impossible. But why do you need that? If you write your own application you can always attach this database at the beginning. But if you want

[sqlite] Attach a database dynamically if not already available within a trigger

2010-03-15 Thread andy
Hello I am hoping someone can help with the following problem. - I want to create a log of all changes to tables in a database. - I would like to keep the log table in a separate database to the main data files - I plan to use triggers to capture changes and insert them into the log table.