Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 3 of 3 total |
v4 Triggers |
Mon, Mar 13 2006 7:30 PM | Permanent Link |
Michael Baytalsky | Hi Tim,
When I write server side trigger, like this: procedure TMainForm.ServerEngineBeforeDeleteTrigger(Sender: TObject; TriggerSession: TDBISAMSession; TriggerDatabase: TDBISAMDatabase; const TableName: String; CurrentRecord: TDBISAMRecord); begin end; Can it be called with the same TriggerDatabase object for different TriggerSession objects - when I have several users connected to the same database? Or will it have individual TriggerDatabase objects for each session? What about thread safe? I understand, that in case several sessions may trigger this event with the same TriggerDatabase object, then TriggerDatabase should be accessed only in thread-safe manner? I'm assuming, that each session will have its own TriggerDatabase object, am I correct? Thanks, Michael |
Tue, Mar 14 2006 1:45 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< Can it be called with the same TriggerDatabase object for different TriggerSession objects - when I have several users connected to the same database? Or will it have individual TriggerDatabase objects for each session? >> It will have individual TriggerDatabase objects for each session to ensure thread-safety. << What about thread safe? I understand, that in case several sessions may trigger this event with the same TriggerDatabase object, then TriggerDatabase should be accessed only in thread-safe manner? >> I'm not sure I understand the question. Could you elaborate ? << I'm assuming, that each session will have its own TriggerDatabase object, am I correct? >> Correct. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Mar 14 2006 5:54 PM | Permanent Link |
Michael Baytalsky | Tim,
Thanks, I understand now. [Thankfully there's nothing to elaborate as far as thread-safety concerned, cause as you said the objects are independent for every session and - therefore - thread. Thanks, Michael Tim Young [Elevate Software] wrote: > Michael, > > << Can it be called with the same TriggerDatabase object for different > TriggerSession objects - when I have several users connected > to the same database? Or will it have individual TriggerDatabase objects for > each session? >> > > It will have individual TriggerDatabase objects for each session to ensure > thread-safety. > > << What about thread safe? I understand, that in case several sessions may > trigger this event with the same TriggerDatabase object, then > TriggerDatabase should be accessed only in thread-safe manner? >> > > I'm not sure I understand the question. Could you elaborate ? > > << I'm assuming, that each session will have its own TriggerDatabase object, > am I correct? >> > > Correct. > |
This web page was last updated on Wednesday, May 15, 2024 at 08:40 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |