Monday, October 3, 2005

Strange error in Forms 10g

Recently when i was working on a project, we were passing a parameter of the form (xxx,xxxx,xx) to the report . When the destype was preview , the parameters got passed flawlessly. However, when it was changed to printer to allow direct printing, the report got the parameter as xxx. It skipped anything after the first comma. Forms version was 9.0.4.0.19

When the same thing was executed in 10g patch 1, 9.0.4.1 it worked fine. Looks like this bug was fixed in that version.

Since we couldn't apply the patch for now, we did a workaround. Since all the comma seperated variables that we were passing were numbers, we encoded ',' to 'a' and passed it as (xxxaxxxxaxx) . In the report we decoded the 'a' back into ','. Voila!! It works like a charm now.

Hope to keep posting continuously in future.

Thursday, August 11, 2005

FRM-40654 error

All Forms Devlopers must be aware of the infamous error
FRM-40654 : Record has been updated by another user. Re-query to see change.

This happens under the following conditions :

1) Developer does not understand the forms SQL processing logic and tries to issue his own insert, update,delete and query statements

2) Another user has Updated the records and committed , that the first user is trying to update now. The first user's data is now stale. so forms issues the error message.

3) This reason is very unknown but quite common. You use a pre-insert or pre-update trigger at the database level to change values to database columns. But these are not passed back to the forms after commit is made. So you get the error this time too, eventhough you are the only user. In this case best way is to "Set the DML Returning Value at the Data Block level to Yes" .

Note : This property is available forms 6 and above only.
In case of previous versions, you need to requery the data.

Thanks,
Hope to comeup with something more interesting ,

Venkat

First Technical Blog!!

Hi,
I work as an Oracle Developer . I am from Bangalore, India. I will be blogging on the following
> Oracle Database PL/SQL
> Oracle Forms
> Oracle Reports

Hopefully I will be posting something almost everyday

Thanks
venkat