What is the appropriate etiquette if I don't receive a solution/answer in ??
days

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of MoDementia
Sent: Friday, 23 May 2008 12:32 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] Checking for open transactions attach/detach database and
Trigger behaviour with attached databases

Hi,

My first submission 1 Problem and 1 question J

My problem

I have 2 processes that are causing problems after commits/locks

1.
Copy main database to copydatabase using filesystem object
How to determine when copydatabase is ready for attach?
Attach copydatabase  <-- need to retry a few times
Delete some rows
Detach copydatabase

2.
Attach copydatabase
Begin transaction
Update main database from data in copydatabase
Commit
How to determine when copydatabase is ready for detach?
Detach copydatabase  <-- Need to retry many times

The main application traps the errors before my MS VBScript can use ON ERROR
so I need to test for the error before it occurs.

Hope There is an easy solution 


My question  (This seems to be answered as I didn't lose all the rows in the
main database)

Are triggers restricted to their respective databases?

Main Database Table Name = Songs
Attached Database Table Name = Songs
Both have triggers
CREATE TRIGGER delete_songs DELETE ON Songs
BEGIN
...
END

Will these act only their respective tables or will they both act on the
main database?

Regards
Terry Ganly
______________________________________________
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

Reply via email to