Hi all,

Is is possible to find the status of a datasouse which is bounded to a grid, before committing the data. The status means, if there are new rows, if the data is modified in the datasource etc. We can use session variable, but i would like to know if there are any other mechanism.



asked 18 Jun '13, 10:51

suranga's gravatar image

accept rate: 0%

Hi Suranga,

The API api_datasource.isDirty(in_datasourcename_tx IN varchar2) returns whether any rows in the datasource has changed.

The API api_dataource.isDMLNecessary(in_datasourcename_tx IN varchar2) returns whether the datasource has changes in it that will be applied to the database in the next api_aplication.doCommit.

The difference between the two being that you may have a column in a datasource with updateable checkbox unchecked. If the data in such a column is modified, isDirty returns Y but isDMLNecessary returns N.

Each row in a datasource has an additional columns called DS_ROWSTATUS. If you retrieve the rows in a datasource using a datasource API such as getRow,getRowByPK,getQuery or getRows etc... then the record or the collection you will receive will have this additional column to indicate the status of the row. The valid values for the DS_ROWSTATUS column are implemented as constants in the api_datasource package as:

row_status_deleted: Constant that represents the deleted row status. row_status_new: Constant that represents the new row status. row_status_temp: Constant that represents the new row status which is not modified yet. row_status_updated: Constant that represents the updated status.

The row status might also be null which means that the row is queried from the database but no changes has been made on it.

Additionally you may use the api_datasource.getRowStatus or api_datasource.getRowStatusByPK API's.

Hope this helps.

Kind Regards, Yalim


answered 18 Jun '13, 13:52

Yalim's gravatar image

Yalim ♦♦
accept rate: 20%

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](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



Asked: 18 Jun '13, 10:51

Seen: 1,943 times

Last updated: 18 Jun '13, 13:52

© Copyright Gerger 2017