Do you have an API that can give us the name of the datasource that is used in a Pre-Query event? We would like to call a generic action in the Pre-Query event of a datasource and need the name of the datasource in our database procedure.

asked 06 Dec '12, 01:45

Peter%20W's gravatar image

Peter W
1219
accept rate: 0%


Hi Peter,

You can use api_application.getEvent API to determine the name of the object triggering the event.

procedure printEvent is
  v_event_t api_event.t_event;
begin
  v_event_t := api_application.getEvent;
  api_debug.log('event name' || v_event_t.event_cd);
  api_debug.log('object name'|| v_event_t.objectName_tx);
  api_debug.log('object type' || v_event_t.objectType_cd);
end;

Regards, Ibrahim

link

answered 06 Dec '12, 02:17

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
1.5k5
accept rate: 25%

edited 06 Dec '12, 03:01

This is indeed what we need! Thanks!

One tiny remark: in your example code you declare v_event_t with a wrong type; it should be api_event.t_event.

(06 Dec '12, 02:33) Peter W

Thanks Peter, my mistake, I fixed it.

(06 Dec '12, 03:02) Ibrahim Sand... ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×64
×3

Asked: 06 Dec '12, 01:45

Seen: 1,234 times

Last updated: 06 Dec '12, 03:02


© Copyright Gerger 2017