Home » Developer & Programmer » Forms » database_value not returning proper value
database_value not returning proper value [message #134373] Wed, 24 August 2005 10:27 Go to next message
priyravi
Messages: 41
Registered: July 2005
Member
Hi all,

The GET_ITEM_PROPERTY(ITEM_NAME,DATABASE_VALUE) does not seem to work in Forms 9i. Could anyone tell me if I am mising something or this is an Oracle bug.

I display the database value by using the GET_ITEM_PROPERTY built-in, as well as selecting it from the database (using a SELECT statement) and then displaying. The built-in returns the value that is on the screen (incorrect one), while the SELECT statement returns the database value, which is the correct one.

Any suggestions, anyone?
Re: database_value not returning proper value [message #134436 is a reply to message #134373] Wed, 24 August 2005 23:15 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Quote:

Database_Value property
Description
For a base table item that is part of a database record whose status is QUERY or UPDATE,
Database_Value returns the value that was originally fetched from the database. When a fetched value
has been updated and then subsequently committed, Database_Value returns the committed value.
For a control item that is part of a database record, Database_Value returns the value that was originally
assigned to the item when the record was fetched from the database.
For any item that is part of a non-database record whose status is NEW or INSERT, Database_Value
returns the current value of the item.
Note: You can examine the Database_Value property to determine what the value of an item in a
database record was before it was modified by the end user.
Note: You can examine the SYSTEM.RECORD_STATUS system variable or use the
GET_RECORD_PROPERTY built-in to determine if a record has been queried from the database.
Applies to:
all items except buttons, chart items, and image items
Set not settable
Refer to Built-in:
GET_ITEM_PROPERTY
What is the record_status when you get the wrong value?

David
icon9.gif  Re: database_value not returning proper value [message #134470 is a reply to message #134436] Thu, 25 August 2005 02:12 Go to previous messageGo to next message
priyravi
Messages: 41
Registered: July 2005
Member
the record status is insert when i modify any record ......i m updating a item in the save button so i get the new value from the block and the old value form databse_value,as it doent work the database_vale returns only the present value in the screen,the update fails with no data found......hwo to update the item.....

i cannot write in post/pre text item bcoz when i use it ,its working fine in single user environment but in multi user envi it fails,forms by default lock the recrd when a dml stmt is found..im completely hang up how to update and hwr to rite it......even the databse_value is not working
Re: database_value not returning proper value [message #134630 is a reply to message #134470] Thu, 25 August 2005 17:28 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
You say "the record status is insert when i modify any record" ... if the status is 'insert' then the status is 'insert' NOT 'update' ... are you building a new record? Have you used create_record and are now trying to popualte it?

David
Previous Topic: Here is the example of On the Fly Tlist Search
Next Topic: abt bar code reader system
Goto Forum:
  


Current Time: Fri Sep 20 03:25:33 CDT 2024