Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: InterBase/Server    [ Add a report in this area ]  
Report #:  3590   Status: Reported
request for keyword ATTACHMENT_ID
Project:  InterBase Build #:  0
Version:    7.0 Submitted By:   Raymond Wright
Report Type:  Suggestion / Enhancement Request Date Reported:  2/21/2003 11:38:04 AM
Severity:    Infrequently encountered problem Last Updated: 6/30/2006 5:21:00 AM
Platform:    All platforms Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (2 Total Ratings)
5.00 out of 5
Total Votes: 13
there are situations when knowing the USER in a stored proc or trigger is not adequate (web apps, multiple instance desktop apps) that use the same user name.

a keyword is requested to identify the actual connection handle. either ATTACHMENT_ID, PROCESS_ID, or something to that effect.

my personal use for this is for implementing a "semaphore" or "critical section" type of thing for recursive stored procedures. i suppose web apps in which many users are logged in with the same user name is another situation where this would be helpful and needed.
Steps to Reproduce:
You can work around this with a global temporary table in IB 7.5+. Data you put in that table is visible to your attachment only. So a trigger can tell which attachment it is "working in" by SELECTing from the global temporary table.

Christophe Benoit at 7/27/2009 8:27:50 AM -
Same for me, that would be very useful: I simply want a trigger to store specific data per Attachment (see

Christophe Benoit at 7/28/2009 2:59:09 AM -
The global temporary table is a good enough workaround for me though.

Christophe Benoit at 7/27/2009 9:30:58 AM -

Server Response from: ETNACODE01