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
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;
  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);

Regards, Ibrahim


answered 06 Dec '12, 02:17

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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



Asked: 06 Dec '12, 01:45

Seen: 1,316 times

Last updated: 06 Dec '12, 03:02

© Copyright Gerger 2017