Subject Triggers/Stored procs and Locks
Author Johannes Pretorius
Good day all
-=00=-=-00-=-=0

Thanks to all the help that was given so far. Also thanks for your patience with me.

This is also related to "Transaction and Stored procedures."

I have 2 topics with questions
---------------------------
A) Does triggers on the database only get triggers when the transaction is commited ? Or can I assume that it
gets run inside of the transaction also. If this is the case and if I call stored procedures inside those triggers
to perform certain function that will define the next step in logic in my program code. Does these stored procedures
that is called via the databases before of after insert or update also exist inside my transaction ?

B) Locking of records. As previously explained with transaction and data stored on pages and then commited to database if all is fine etc.
i) When a record is locked thanks to my transaction. Is it a row level (record) or page level (all active ones on the cache page) lock ?
ii) What will lock the record ? only updates , inserts and deletes or does normal selects also lock records ?
iii) If I only start a transaction and then commit it immediately afterwards with absolutely nothing between it. Does a database lock appear at all ?


Thanks in Advance for all your help and patience


Johannes Pretorius
(Programeerings Departement- Promed)

Tel : +27 11 607-3300
Faks : +27 11 622-6939
webtuiste : http://www.promed.co.za

VRYWARING

Hierdie e-pos en enige toepaslike aanhangsels is vertroulik, regsgepriviligeerd en deur landswette
beskerm. Geliewe daarop te let dat die inhoud van hierdie e-pos van 'n persoonlike aard is en
vir die uitsluitlike aandag van die geadresseerde bedoel is. Dit mag onwettig wees om enige gedeelte
van die inhoud van hierdie e-pos te gebruik, te reproduseer of vir eie gewin aan te wend. Indien
hierdie e-pos u per abuis bereik het, word u versoek om die sender onmiddelik te verwittig via e-pos
of deur (011) 607 3300 te skakel en die boodskap te vernietig. Promed vereenselwig hom
nie noodwendig met die opinies van die sender van hierdie boodskap nie en doen afstand van enige
aanspreeklikheid vir enige aksies wat geneem word op grond van inligting wat in die e-pos vervat
word, tensy dit op skrif bevestig word. Alhoewel die nodige stappe gedoen is om te verseker dat
die e-pos virusvry is, kan Promed geen aanspreeklikheid aanvaar vir die verlies of skade wat
voortspruit uit virusse in hierdie e-pos of sy aanhangsels nie.

DISCLAIMER

This e-mail and any attachments to it is confidential, may be subject to legal privilege and is
protected by law. Kindly take note that this e-mail is sent for the personal attention of the intended
recipient. It may be unlawful to use, copy, forward or disclose any of of the contents of this e-mail.
If you have received this e-mail in error, please advise us immediately via e-mail or telephone (011)
6073300 and delete this e-mail and its attachments from your computer. Promed gives no warranties
and exclude any liability for the content of this e-mail, or for the consequences of any
actions taken on the basis of the information provided in this e-mail or its attachments, unless that
information is confirmed in writing. Promed does not ratify any opinion of the sender and although we
have taken reasonable precautions to ensure that no viruses are present in this e-mail, we cannot
accept responsibility for any loss or damage arising from the viruses in this e-mail or attachments.


----------



No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.9.1/369 - Release Date: 19/06/2006


[Non-text portions of this message have been removed]