Frm 40505 ошибка

Содержание

  1. Querying a Price List Fails With Error : FRM-40505: ORACLE error: unable to perform query. (Doc ID 2302784.1)
  2. Applies to:
  3. Symptoms
  4. Cause
  5. To view full details, sign in with your My Oracle Support account.
  6. Don’t have a My Oracle Support account? Click to get started!
  7. FRM-40505 And ORA-00600 [qcsvsci1] Errors (Doc ID 2248828.1)
  8. Applies to:
  9. Symptoms
  10. Cause
  11. To view full details, sign in with your My Oracle Support account.
  12. Don’t have a My Oracle Support account? Click to get started!
  13. Unable To Query/Find Existing EAM Work Order:’ORA-01722: invalid number’ and ‘FRM-40505: ORACLE error: unable to perform query.’ (Doc ID 303893.1)
  14. Applies to:
  15. Symptoms
  16. Cause
  17. To view full details, sign in with your My Oracle Support account.
  18. Don’t have a My Oracle Support account? Click to get started!
  19. FRM-40505: unable to perform query
  20. Comments
  21. frm-40505:ORACLE error: unable to perform query in oracle forms 10g
  22. Comments

Querying a Price List Fails With Error : FRM-40505: ORACLE error: unable to perform query. (Doc ID 2302784.1)

Last updated on AUGUST 30, 2021

Applies to:

Symptoms

When attempting to query any Price List,
the following errors occur

ERROR

ORA-00904: «ACCUM_ATTRIBUTE»: invalid identifier

FRM-40505: ORACLE error: unable to perform query

Price List Header shows up but the Lines are not pulled out.

STEPS

The issue can be reproduced at will with the following steps:
1. Oracle Pricing Manager responsibility
2. Price Lists > Price List Setup
3. Query for any Price List and see the FRM error

Cause

To view full details, sign in with your My Oracle Support account.

Don’t have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.

Oracle offers a comprehensive and fully integrated stack of cloud applications and platform services. For more information about Oracle (NYSE:ORCL), visit oracle.com. пїЅ Oracle | Contact and Chat | Support | Communities | Connect with us | | | | Legal Notices | Terms of Use

Источник

FRM-40505 And ORA-00600 [qcsvsci1] Errors (Doc ID 2248828.1)

Last updated on OCTOBER 03, 2019

Applies to:

Symptoms

1. Forms failing with:

2. While database alert log also shows error during execution of the APPS.ARPT_SQL_FUNC_UTIL package:

Trace file shows the following:

Cause

To view full details, sign in with your My Oracle Support account.

Don’t have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.

Oracle offers a comprehensive and fully integrated stack of cloud applications and platform services. For more information about Oracle (NYSE:ORCL), visit oracle.com. пїЅ Oracle | Contact and Chat | Support | Communities | Connect with us | | | | Legal Notices | Terms of Use

Источник

Unable To Query/Find Existing EAM Work Order:’ORA-01722: invalid number’ and ‘FRM-40505: ORACLE error: unable to perform query.’ (Doc ID 303893.1)

Last updated on JANUARY 30, 2022

Applies to:

Symptoms

When trying to query work orders from the Find Work Order screen, the following error occurs.

ERROR

ORA-01722: invalid number
FRM-40505: ORACLE error: unable to perform query.

STEPS

1. Responsibility: Enterprise Asset Management
2. Navigation: Work Orders -> Work Orders
3. Query any work order and the errors pop up

Cause

To view full details, sign in with your My Oracle Support account.

Don’t have a My Oracle Support account? Click to get started!

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.

Oracle offers a comprehensive and fully integrated stack of cloud applications and platform services. For more information about Oracle (NYSE:ORCL), visit oracle.com. пїЅ Oracle | Contact and Chat | Support | Communities | Connect with us | | | | Legal Notices | Terms of Use

Источник

i am having two data blocks Emp,Dept(default tables)

i am creating master-detail relationship between two blocks

and copying ename into dept.

displaying the dept with the feilds of dept table and ename on the canvas

exuting query and it is showing error- unable to perform query.

could any one show the solution for this

Just a wild guess regardless what you are trying to do;

you have set the «ename» «Databse Item» property to «Yes». That’s why the Form is unable to query your table, it’s not finding a column called «ename» in the table.
Set it to «No» it should work.

Thanks for your reply tony but i need to populate the details for the field ename also

You need to have some sort of relation between the DEPT Block.

Which is your master block, EMP or DEPT??

Guess what you have to do is assuming ( if I inderstood your issue corretly, else please explain in detail)
dept table as master block and emp as detail block

on the detail block’s empno field/item property sheet , there is a column called » copy value from item»

put in a value there as «dept.empno» ( again assuing the empno is the joining factor) or you have to do for all the columns that you want to link/join.

Here is my issue
i have two data blocks emp,dept(with the same values in the database.i am giving the basetables for ur understanding.)

i have joined the two datablocks with deptno as common column.
and displaying empno,ename,job,sal,comm,mgr,hiredate, and copyied dname from dept in one frame on canvas.
i want to display the values for all the above mentioned columns along with dname also.
i have tried as you told but it is not exucuting the value for dname.if i keep dname as non database item.it is only executing the columns for emp

Here is my issue
i have two data blocks emp,dept(with the same values
in the database.i am giving the basetables for ur
understanding.)

Источник

frm-40505:ORACLE error: unable to perform query in oracle forms 10g

I get error frm-40505:ORACLE error: unable to perform query on oracle form in 10g environment, but the same form works properly in 6i.

Please let me know what do i need to do to correct this problem.

press Shift-F1, when you get this error. What does the detailed message say ?

do you have the correct patchset installed for your 10g database? patch 17 ?

Can you provide me error detail.
Press key for the display error.
Use Ctrl + K to know the all keys.

From
Chirag Patel

The database version — Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Forms server — 10g release 2

The following query raises the error

SELECT ROWID,COMP_CODE,COMP_NAME,QTY_WATER,QTY_WATER_INTRISIC,QTY_ETHANOL,QTY100,IS_VA,IS_VI,IS_VS,COMP_ID,PAR_CODE FROM V_LE_USID_1L WHERE chemin = :1 and par_code = :2 order by qty desc

Error
ORA-00904: «ROWID»: invalid identifier

Can you please tell me if Patch 17 has to be applied for the forms server or the database server?.

We are migrating from form 6i to forms 10g and Oracle database from 9i to 10g.

The form which is raising the error works fine on forms 6i and Oracle 9i combination.

ok, let’s go step by step.

which of the two migration steps is your problem? Please don’t migrate both things at the same time (db and forms), because then you don’t know, if it is a forms or a db problem.

When the query is executed in database, I get the same error (ora-00904). Please see the description below.

SELECT ROWID,COMP_CODE,COMP_NAME,QTY_WATER,QTY_WATER_INTRISIC,QTY_ETHANOL,QTY100,IS_VA,IS_VI,IS_VS,COMP_ID,PAR_CODE
FROM V_LE_USID_1L
WHERE chemin = ‘BP’ and par_code = ‘275232 BPOP3200’
order by qty desc

SELECT ROWID,COMP_CODE,COMP_NAME,QTY_WATER,QTY_WATER_INTRISIC,QTY
*
ERROR at line 1:
ORA-00904: «ROWID»: invalid identifier

Please let me know if you need any inputs to fix this problem.

No need any patches.

I am also using same version.
The database version — Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Forms server — 10g release 2

Rowid is internal field for the all database block in the form.

do you have item within that block which database column name property has «ROWID» value ?

Источник

Аннотация: В этой лекции слушатель знакомится с палитрой свойств формы и основными режимами формы Normal, Query и Enter Query Mode. Также в лекции будут рассмотрены настройка файла конфигурации TNSNAMES. ORA и настройка внешнего вида приложения и дизайнера форм.

Цель лекции: обучить слушателя понимать особенности различных режимов формы и назначение свойств формы. Также слушатели научатся конфигурировать файл tnsnames.ora и настраивать внешний вид формы.

Режимы формы

Режим формы – это состояние формы, ассоциированное с определенным действием пользователя. Каждый из режимов накладывает свои ограничения на выполнение различных операций, причем очень важно знать эти ограничения, чтобы избежать возникновения исключительных ситуаций и других непредвиденных ошибок. Форма может находиться в следующих состояниях:

  • Режим ввода запроса – Enter Query Mode ;
  • Нормальный режим – Normal Mode ;
  • Режим запроса – Query Mode.

Для того чтобы узнать, в каком состоянии находится форма в текущий момент, необходимо проверить системную переменную – :SYSTEM.FORM_STATUS.

Enter Query Mode (Режим ввода запроса)

Режим ввода запроса предназначен для ввода критерия поиска данных в БД. Вы можете вводить критерии запроса в любые базовые элементы, поддерживающие этот режим. При работе в этом режиме пользователю:

Разрешено:

  1. выполнение запросов, как с критерием, так и без критерия ограничения выборки;
  2. подсчет записей;
  3. использование Query/Where-диалога;

Запрещено:

  1. перемещение в другие блоки;
  2. выход из приложения;
  3. выполнение операций DML – Insert (Вставка), Delete (Удаление) и Update (Обновление).

Также в режиме Enter Query запрещено выполнение некоторых триггеров. Пользователь при создании приложения может управлять поведением формы и элементов в режиме ввода запроса. На
рис.
4.1 показан пример ограниченного и неограниченного запроса.

Ограниченная и неограниченная выборка

Рис.
4.1.
Ограниченная и неограниченная выборка

Для того чтобы извлечь все данные из таблицы (Unrestricted Query), достаточно выполнить одну из перечисленных операций:

  1. Нажать кнопку Execute Query на панели инструментов Menu Toolbar.
  2. Перевести форму в режим запроса с помощью команды меню Query|Enter Query или нажатием кнопки на панели инструментов Enter Query и выполнить команду Execute Query.
  3. Выполнить команду меню Query|Execute Query.

Для того чтобы выполнить запрос с ограничением, необходимы следующие действия:

  1. Переведите форму в режим запроса.
  2. Установите курсор в любой базовый элемент и введите критерий поиска.
  3. Нажмите кнопку Execute Query на панели инструментов или выполните любое другое действие, ассоциированное с этой командой.

Если в качестве критерия запроса вы введете конкретное значение, то при формировании запроса оно будет интерпретироваться аналогично оператору «AND=критерий». Если же вам необходимо задействовать другие операторы ограничения выборки, такие как Like, IN или Between, то вам необходимо знать специальные символы, которые реализуют эту возможность.

Элемент Символ/критерий Действие
ID 122 Извлекает строку с ID=122, то есть действует аналогично оператору «…and ID=122»
Name %ван Символ «% и _» действует аналогично оператору Like, то есть возвращает все имена, в которых используется сочетание «ван»
ID #BETWEEN 100 AND 122 Символ hash «#» реализует оператор BETWEEN
ID :I (I – :variable_name) Вызывает Query/Where-диалог

Normal Mode (Нормальный режим)

Нормальный режим – это режим, в котором пользователь может вставлять и модифицировать данные БД, то есть выполнять операции DML. Любое действие, которое пользователь выполняет над базовым элементом, интерпретируется как вставка новой записи, удаление или изменение существующей. При работе в этом режиме пользователю:

Разрешено:

  • выполнять операции DML – Insert (Вставка), Delete (Удаление) и Update (Обновление);
  • выполнять запросы без ограничений выборки, то есть извлекать все записи;
  • фиксировать ( commit ) или откатывать ( rollback ) изменения;
  • перемещаться в другие блоки;
  • выходить из приложения – завершать текущую run-time сессию.

Запрещено:

  • выполнение запросов с критерием выборки;
  • вызов Query/Where-диалога.

Нормальный режим, как вы уже, наверно, успели заметить, в отличие от режима Enter Query позволяет пользователю выполнять намного больше функциональных операций. Нормальный режим – это режим по умолчанию. При проектировании формы разработчик может настраивать режимы вручную или программно, переводя ее из одного режима в другой в зависимости от какой-либо ситуации.

Примечание: если вы сделали изменения и не зафиксировали их, то такая операция, как Execute Query, то есть «выполнить запрос», становится недоступной.

Display Error (Отображение ошибок)

Если при выполнении какой либо операции возникает ошибка или исключительная ситуация, которая отображается в строке состояния, то она может быть отображена командой Display Error Help|Display Error.

Окно Display Error

Рис.
4.2.
Окно Display Error

Когда надо использовать такой способ отображения ошибки и в чем его преимущество? Самая главная особенность этого диалога в том, что он отображает не только код, но и весь текст ошибки. Когда вы получаете в строке состояния сообщение об ошибке типа «FRM-40505:Ошибка Oracle: не в состоянии выполнить запрос» или просто необработанное исключение (Unhandled exception), которое по большому счету вам ни о чем не говорит, то, вызвав окно «Display Error», вы получаете более конкретизированный ответ, а именно код и описание причины возникновения ошибки.

Свойства формы

Разрабатывая форму, вы можете управлять не только настройками объектов модуля, но и настройками самого модуля. Большинство свойств модуля глобальны и действительны для всего приложения. Изменяя настройки модуля, вы можете подключать или отключать меню, устанавливать уровень проверки БД. Разработчику доступны следующие свойства для управления настройками формы:

  • Имя (Name) – внутреннее имя формы. Имя формы необязательно должно совпадать с именем модуля.
  • Информация о подклассе (Subclass Information) – в этом свойстве вы можете указать Класс свойств, на котором хотите базировать форму.
  • Окно консоли (Console Window) – в этом свойстве вы указываете окно, в котором будет показана консоль Forms Builder. Если вы зададите для этого свойства значение NULL, то все сообщения, которые вы определили в своей форме, не будут отображаться в статусной строке.
  • Вызвана отсрочка (Defer Required Enforcement) – если значение этого свойства истинно, то проверка всех элементов, имеющих установленный атрибут «Обязательный», будет отложена до тех пор, пока не наступит проверка записи, – то есть до того момента, пока не будет осуществлена проверка записи, свойство «Обязательный» будет отключено.
  • Ограничения на перемещение мышью (Mouse Navigation Limit) – в этом свойстве вы можете задать область перемещения мыши относительно текущего объекта. По умолчанию текущее значение – «Форма». Ниже перечислены объекты ограничения:

    • Форма;
    • Блок Данных;
    • Запись;
    • Элемент.
  • Первый Блок Данных при перемещении (First Navigation Data Block) – в этом свойстве вы можете задать блок, к которому будет выполнена навигация при запуске формы или при ее очистке, то есть после выполнения процедуры CLEAR_FORM. Если значение этого свойства установлено в NULL, то Forms выполнит навигацию к блоку, который размещен в списке блоков Данных под номером один или к блоку, навигация к которому задана в триггере WHEN-NEW-FORM-INSTANCE.
  • Группа Атрибутов Визуализации Текущей Записи – имя именованного атрибута визуализации, который используется, когда элемент входит в текущую запись.
  • Уровень проверки – определяет область проверки формы во время выполнения. Вы можете устанавливать следующие уровни проверки формы во время выполнения:

    • По умолчанию;
    • Форма;
    • Блок Данных;
    • Запись;
    • Элемент.
  • Режим Взаимодействия – устанавливает режим блокирования для взаимодействия с Базой Данных.
  • Максимальное Время Запроса – в этом свойстве вы можете определить максимальное время, которое форма будет ожидать выполнения запроса, после чего выполнит прерывание.
  • Максимум Выбранных Записей – это свойство определяет максимальное число выбранных записей, после чего выполнение запроса будет прервано.
  • Режим Изоляции (Isolation Mode) – уровень изоляции транзакции.
  • Канва с Горизонтальной/Вертикальной Панелью Инструментов – это свойство характерно только для окна MDI, так как выводит для него горизонтальную/вертикальную панель инструментов.
  • Направление – задает направление текста «Слева направо» или «Справа налево», другими словами, определяет позицию курсора ввода.

Выбор системы координат

Используя Палитру Свойств, вы можете определять, в какой системе координат даны размеры и позиции в символьных ячейках. Чтобы определить систему координат для формы, выполните следующие действия:

  1. Находясь в Навигаторе Объектов, запустите Палитру свойств модуля формы.
  2. Найдите и выберите свойство «Система координат» для вызова окна «Информация о координатах» (
    рис.
    4.3.).

    Окно "Информация о координатах"

    Рис.
    4.3.
    Окно «Информация о координатах»

  3. В поле «Система координат» вы можете выбрать тип системы – Абсолютная (Real) или Символьная (Character). Единицы измерения доступны только для абсолютной системы координат, что же касается Символьной системы, то тут вы ограничиваетесь заданием ширины и высоты символьной ячейки. В Символьной системе координат единицы измерения не используются. В абсолютной системе координат возможны следующие единицы измерения:
    • пиксел;
    • сантиметр;
    • дюйм;
    • пункт;
    • десятичная точка.
  4. Выберите Абсолютную систему координат, а в качестве единицы измерения – Пиксел.
  5. При выборе значения выключателя «Масштабирование шрифта по умолчанию» установки высоты и ширины символьной ячейки становятся недоступными. Если значение выбрано, Forms самостоятельно выполняет масштабирование шрифта.
  6. Отмените выбор «Масштабирования шрифта по умолчанию» и установите ширину ячейки, равную 7, а высоту – 14.

Для того чтобы изменения вступили в силу, нажмите кнопку «ОК» – или нажмите кнопку «Отмена», чтобы вернуть значения по умолчанию.

Hi,
How to find the corresponding ORA message for FRM-40505 in forms? I guess when i receive FRM-40505, then how to see the ORA message to see the issue. I'm using refcursor to populate the multiblock and some time
EXECUTE_QUERY fails and i get FRM-40505. I wanted see ORA message to see why it fails.
Thanks 

Shift+F1 

it didn't work for me. i tried shift+F1 but no luck. 

FRM-40505: ORACLE error: unable to perform query.
Cause:     Processing error encountered. The table associated with the current block of the form might not exist, or your username might not have authority to perform the specified action on the table.
Action:     Pressing [Display Error] provides more information, if it is available. You can also try to update or delete this record later. If necessary, contact your DBA.
Level:     >25
Type:     Error
Please mark as sloved if it helps
KK 

If your query in a different block. try this
Put GO_BLOCK , before EXECUTE_QUERY
or put the query button to block you are quring.
Manoj. 

You didn't mention your version. Try Shift+Ctrl+E 

Hi Slava, Sorry about that. We're on 10g (web forms). I tried Shift+Ctrl+E after FRM-40505 and it says FRM-42100.
KK , thx. i know FRM-40505: ORACLE rror: unable to perform query. The table does exists and my username have authority to perform the action on the table. It works 98% of the time but some time EXECUTE_QUERY fails and i get 40505. So i'm trying to get the corresponding ORA message so i should know the real cause of failing EXECUTE_QUERY.
Manoj. - I've a GO_BLOCK before EXECUTE_QUERY
Thank you all 

check the datatype of columns in the table and items in the form is matching.
sometimes the dataype of the data stored in the table is not matching with the datatype of the items in the table, this can happen.
mark if it helps
KK 

Try to trap this in on-error trigger:
if error_code=40505 then     
     display_error;
     message(dbms_error_code ||' ' ||dbms_error_text);
     message(error_code ||' ' ||error_text);
     raise form_trigger_failure;
else
     message(error_code ||' ' ||error_text);
     raise form_trigger_failure;
end if;     The fact that execute_query fails just sometime - points that the error may be data related.
For example your forms item datatype is number, but corresponding table column is varchar that contains numeric data in 98%
This will raise "Invalid Number" only in when non-numeric data queried.
As KK suggested make sure datatype of your items and corresponding table columns are matching 

Thanks Slava and KK:
I have made sure that items datatype and corresponding table columns are matching.
I tried your code in on-error trigger and i get this: FRM-40733: PL/SQL builtin DBMS_ERROR_CODE failed and
FRM-40733: PL/SQL builtin DBMS_ERROR_TEXT failed. 

You mentioned you are using ref cursor to populate block.
Can you share the code in the query procedure that block based on?
Is it local forms procedure or DB?
Can you run this form in debug mode?
Sound like after your query fails - form diisconnects from DB.
You can try sql*net trace for more clues. Modify sqlnet.ora add
          trace_level_client=16
          trace_file_client=cli
          trace_directory_client=c:temp
          trace_unique_client=true
trace_timestamp_client=ON
May be a good idea also to check Database alert.log for ORA-600 errors. 

Hi Slava,
Yeap i'm using back end procedure (spkg_tst.sp_grid_details) to populate the grid. It has a very simple select statments etc.
where is the database alert.log located?
Thx 

Malik has been emailing me on this problem as well.
I too suspect there may be an Oracle disconnect somewhere, although I cannot imagine why the login-retry ( as stated in his multi block ) would trigger the problem.
I have given him some pointers, such as making sure :System.Message_level is always set to zero, and find and remove any "Exception when others then null;" if coded anywhere.
Malik, how are you switching from form to form and back? Maybe that causes the issue.
When your form is supposed to query the block, maybe insert some code to do a pl/sql SELECT Count(*) prior to the query and report back via a message, the row count it should find.
And lastly, Malik, I'd prefer you posted here rather than use email, because there are many more eyes to look at your problem. And there is no way I could help with a phone call. Words flow, and are hardly can be absorbed. When you write them, we can refer back, and maybe come up with new ideas. With a phone conversation, it is all lost. 

I got your answer that there is no problems with :System.message_level or Exceptions.
Now... in your original post, you wrote:
-> and then go back to the 2nd form then multi block doesn't show the data at all
In the second form, your when-new-form-instance must do a go_block and Execute_Query to that Multi-row block.
So just before that, insert some debugging lines. Try the Select Count(*) and display the result at that point. Is there any chance the block's default where clause has been changed? IF so, try displaying that. If the block is based on a stored procedure, then use pl/sql to make calls to it and see what it returns.
It would be helpful if you downloaded my ZDebug form, which writes debugging messages you create into a record group, so you can then view the results of your debugging process whenever you want. You can download ZDebug here:
ZDebug - Forms Debugging Message Tool
I would sure be using it if I were in your shoes.
Edit: And maybe even before you add debugging code, try cleaning up the fmb code in your forms. Use the compile All function: Ctrl-Shift-K
Or better yet, do the tried and true semicolon-semicolon replace all:
Re: FMB size shrinks dramatically
and
Re: Why does this happen - find ';', replace with ';'?
Edited by: Steve Cosner on Jul 15, 2009 9:22 AM
more suggestions 

Steve, it is obvious, you know much more details about this issue than I do, but after reading the original post about custom logon and navigation between forms - I would say that form disconnected even before query is executed. I suspect any "select count(*)" in WNFI will fail too.
Malik, what do you use to navigate between forms? CALL_FORM, NEW_FORM, OPEN_FORM (session/no_session) and how do you exit from forms? Just exit_form or may be you use some call/new/open again?
P.S. alert.log location depend on DB version and OS. But you can: select value from v$parameter where name = 'background_dump_dest'

Related

Error in Updating Recrods

Hi All,
I have made ODBC Connection for SQL Server7. When i try to update or delete any record from Forms 6i then i got following errors.
FRM-40512:Oracle error unable to issue SAVEPOINT command.
OCA-30021:error preparing/executing SQL statement.
Its emergency plz help me. 
There is a form-level property called Savepoint Mode (turned on by default) that you can turn off to run against non-Oracle databases. This property must be set programmatically:
SET_FORM_PROPERTY('formname',SAVEPOINT_MODE, PROPERTY_FALSE);
Hi Pamela
First thanks to reply me.
I changed the savepoint mode. But OCA-30021 is still occuring and when i update any value by quering record then following message occurs
"The record has been updated by another user pleas query and retry"
Best regards
Hassan 
Is any code that you've written being executed when you update? If so, see if this reproduces on a simple form with no code. If it doesn't, perhaps there is something in the code that SQL Server doesn't understand, such as directly calling a stored procedure or using the NVL function. Using EXEC_SQL may resolve such problems -- see bug 1150980 and Note 196941.1 for a couple of examples. 
Hi all.
I didnt write any code yet in my form.
Only create a tabular form without any coding.
And there is another problem when i execute query direcly with F8 then all columns values are displayed properly. But when i use F7 and enter any valid value for a particular column then ##### or ***** print for some columns.
Please Help me.

need help with forms

hello,
i am using forms 9i. trying to access database as well as insert and update at runtime. i am getting this error at run time. i tried in google but no details. can any one help me with this.
FRM 40735 WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-01400
thank in advance.
There is an error in the PL/SQL code within your WHEN-BUTTON-PRESSED trigger.
Without the code, we can't do anything for you. 
The error indicated that one or more required fields is NULL. This could be because Forms is trying to explicitly load a NULL into the field (e.g., the user left the field blank or the item is not visible on the form) or because the data block doesn't contain the field at all, so the insert statement that Forms creates doesn't refer to the field, in which case Oracle inserts an implicit NULL.
Hope this helps. 
thanks every one. yes you were right. there was a small mistake in my tables and code. it really helped me find the bug.
thanks a lot again.

standard.commit

Hi all,
I have header info and under this I have a tab canvas. I have separate buttons save/restore in the header and the tab pages.
After entering new values in the header [actually i am using execute_query to fetch header info from the table. some fields of this table are there in the tab pages], if I give standard.commit, record is not getting saved. what should I give?
If I use commit_form, runtime failure occurs and url is getting closed.
any help please
Regards
Priya 
try doing commit_form or do_key('commit'); 
No use. not working 
well have you tried using post to test whether the record is saved or not? 
Hopefully ur Datablock is
1) a database block .
2) has its parameter update_allowed as yes.
Rest of the parameters of block & item are set properly. 
I have missed one <Not null> column in Insert statement. That was causing this problem. but need to know whey this error was not thrown? If I use standard.commit, nothing happens.
If I use commit_form form url is shutting down..
Regards
Priya 
Hi ,
Try debuging your form and check what values have at each moment the variables , e.t.c...
Simon 
I have missed one <Not null> column in Insert statement. That was causing this >problem. but need to know whey this error was not thrown?If there is a problem while inserting through database block u wont be getting the error on screen as on-insert trigger is triggered implicitly .If u want to trap the error overload on-insert & explicitly write insertion code , trapping the exception .
Declare
<variable>
Begin
Insert into <table_name>
exception
when other then
message(sqlerrm);pause;
raise form_trigger_failure;
end; 
hello,
I have given explicit insert statement and exception handlers. 
What was the result when u used explicit insert statement & handled exception in
(using sqlerrm) on-insert trigger ?U should be able to trap the Database error like
cannot add null value in not null columns. 
You would have been able to see the error by going to the show errors menu. 
Hi,
C.... When I gave explicit statements, I have not received any error msg [pl go thro one of my previous post on this topic]. This is my doubt why I have not received DB error messages.
Anyway, the problem is solved now after giving proper value for that NOT NULL column.
thanks to everybody for ur inputs.
Regards
Priya 
Hi,
Ok so far from ur discussion it seems that,
1. Ur data block is not a data base block,
2. The field on form that maps to the not null field in table is not made mandatory on form,
3. You are not handling any exception handling for explicit Insert that u r executing
Usually you should make a filed MANDATORY that maps on to NOT NULL field in table, this avoids the unnecessary transactions from oracle forms to oracle database in return from your application server to databse server. This will avoid from user being directed till database and then told that he has entered something wrong or incomplete.
You should handle exception for any DML statement that you are using on form... if you would have handled this exception then there wont have been any problem you would have come to know immediately where the problem is.
Final and most important - a direct answer to ur final question -
It seems that you have set system.message_level some where in your code and forgot to reset it and thats why you are not getting the error you are talking about.
Thanks & Regards,
Avinash,
Pune.
India

Cannot query records here

Help, ... Is there a way to look up the meaning of Message such as "FRM-40360: Cannot query records here." ??? 
You can use the online help documentation to search from the error number.
FRM-40360: Cannot query records here.
Cause:  You attempted to query a block that does not allow queries.
Action:  Do not attempt to query this block.
You may be trying to perform a query on a non-database block.
You may have a database block that doesn't allow queries.
You don't have at least one item in a database block that allows queries. 
So, ... assuming that ... I "don't have at least one item in a database block that allows queries." How can I trap that error? Please tell me specifically ... for example ...
Begin
... Select Statement ...
Exception
When No_Data_Found Then Null; ---This already there but ... does not work
End;
Thanks. 
You are getting a Forms error message from a data block. It is not an error from your programmed pl/sql procedure.
To trap Forms errors, use the on-error tigger. There are quite a few examples in this forum if you search for "on-error", or look at the example in the online help of Forms builder. 
the error comes definitely from your EXECUTE_QUERY on the block.
Press SHIFT-F1, when you see the error. Then you get detailled information about the error 
create key-entqry and key-exeqry triggers for that block, set the execution hierarchy to 'override' and code any message you want in the trigger. 
what kind of problem should the KEY-triggers solve ? 
If the users are prevented from executing a query in that block then they will not see the error message. I'm assuming this error comes from user action rather than a command coded into the form, which would be simple to solve. 
ok, that's a way.
But: I think, that he needs a query else he wouldn't wrote so detailled above it. So he has to give us a hint with the SHIFT-F1 after the query-error 
I didn't read the question properly :-(

Need Code for ‘When-Button-Pressed’ Trigger in Oracle Form

Greetings All,
I need programming code as soon as possible for 'When-Button-Pressed' Trigger for a data block push button item in Oracle Form to allow users to return to a previous search result screen without having to enter parameters and redo search again.
Could you please share with me the programming code for a trigger when a push button is pressed to allow users to return to a previous screen with 1.) parameters set and 2.) query search results saved, if any, in a previous screen?
BTW, we are still on Oracle Form 6i with Database 10G.
Thanks in advance for any/all the help you might assist on this,
Jinlan
-- 
Hi,
You can use GET_BLOCK_PROPERTY('block_name', LAST_QUERY). This function returns the SQL statement of the last query in the specified block.
Hope can help
Mariella 
Mariella,
Thanks for the information. I forgot to mention the progrmming code that the search inquiry and parameters used for the search are in a form that is separated from the calling form. GET_BLOCK_PROPERTY('block_name', LAST_QUERY) probably works within one form, but I am not sure if it will work between forms.
Thanks again,
Jinlan
-- 
You can use a global variabile to save the result of GET_BLOCK_PROPERTY('block_name', LAST_QUERY), something like :global.lst_qry_frmx := GET_BLOCK_PROPERTY('block_name', LAST_QUERY);
Global variable works between forms, the only way to erase a global variable is calling the erase built-in. You can test if a global variable is been created using the default_value buil-in: if the global.variable exists it do nothing, if it doesn't exists the procedure create it with the default value. 
Mariella,
Thanks for the great information, and I will try your suggestion as soon as I get a chance. Sorry for the late response on this as I have been assigned to and need to complete a higher priority task since last Friday, 05/08/09. :(
p.s. I will share my code here in the near future (i.e. if I make it to work.) :)
Thanks again,
Jinlan
-- 
Greetings All,
It turns out that my coding problems to allow users to return to the form with a previous search result and parameters saved from a different form were resolved in the following thread (posted on Jul 24, 2009 1:18 PM):
Problem with Call_Form to Return to the Previous Screen with Saved Results
The solution is to add the following programming code:
CALL_FORM('<called_Form_name>', HIDE,NO_REPLACE, NO_QUERY_ONLY) in the "When-Button-Pressed" Trigger for the 'PB_Return_2_Called_form' item ; in Form B
EXIT_FORM in the When-Button-Pressed Trigger for the 'PB_Return_2_Calling_Form' item
Thanks,
Jinlan
--

Hi,
I get error frm-40505:ORACLE error: unable to perform query on oracle form in 10g environment, but the same form works properly in 6i.
Please let me know what do i need to do to correct this problem.
Regards,
Priya

Hi everyone,
I have block created on view V_LE_USID_1L (which gives the error frm-40505) . We don’t need any updation on this block, so the property ‘updateallowed’ is set to ‘NO’.
To fix this error I modified ‘Keymode’ property, set it to ‘updatable’ from ‘automatic’. This change solved the problem with frm-40505 but it leads one more problem.
The datablock v_le_usid_1l allows user to enter the text (i.e. updated the field), when the data is saved, no message is shown. When the data is refreshed on the screen, the change done previously on the block will not be seen (this is because the block updateallowed is set to NO), how do we stop the fields of the block being editable?
We don’t want to go ahead with this solution as, we might find several similar screens nad its diff to modify each one of them individually. When they work properly in 6i, what it doesn’t in 10g? does it require any registry setting?
Regards,
Priya

Similar Messages

  • FRM-40505  Oracle Error: Unable to perform query(URGENT)

    Hi I developed a form with a control_block and table_block(based on table)
    in same Canvas.
    Based on values on control_block and pressing Find button detail block will be queried.
    Control_block ->
    textitem name «payment_type» char type
    text item name «class_code » char type
    push button «find»
    base table: —> payment_terms(termid,payment_type,class_code,other colums)
    table_block is based on above table
    Now I have written when-button-pressed trigger on find button..
    declare
    l_search varchar2(100);     
    BEGIN
    l_search := ‘payment_type=’|| :control_block .payment_type||’ AND class_code=’||:control_block .class_code ;
    SET_BLOCK_PROPERTY(‘table_block’,DEFAULT_WHERE,l_search);
    go_block(‘table_block’);
    EXECUTE_QUERY;
    EXCEPTION
         when others then
         null;
    END;
    I am getting
    FRM-40505 Oracle Error: Unable to perform query
    please help..

    You don’t need to build the default_where at run time. Just hard-code the WHERE Clause property as:
        column_x = :PARAMETER.X
    But, if for some compelling reason, you MUST do it at run time this should work:
        Set_block_property(‘MYBLOCK’,Default_where,
            ‘COLUMN_X=:PARAMETER.X’);
    Note that there are NO quotes except for first and last. If you get some sort of error when you query, you should actually see :Parameter.X replaced with :1 when you do Help, Display Error.

  • FRM-40505 ORACLE error: unable to perform query

    I have a block based on a table but when I issue an execute_query in «WHEN_NEW_BLOCK_INSTANCE» I get the above error.
    I know can access this table because immediately after this I select some fields from the table into variables and display them. However when I try and assign them to the fields in the block I get «FRM:41051 You cannot create records here.»
    Can you please help.

    If I set «Insert Allowed» and Update Allowed» to yes I can assign values I’ve selected form the table to the fields but the execute_query still fails.
    By the way, I have a where clause in the property block to limit the number of rows brought back to 1

  • [SOLVED] FRM-40508:ORACLE error: unable to INSERT record

    Hi all,
    I have migrated this form from 4.5 to 10g (Version 10.1.2.0.2 ). This form inserts a record into the database table when all the fields in the form are filled and a button Save is presed.
    At the time when I press the Save button, I get this error. FRM-40508:ORACLE error: unable to INSERT record
    So I went on to see the «Display Error» from help and found to be the database error, inserting into a table.
    The error message is ORA-00932: inconsistent datatypes: expected DATE got NUMBER
    The form where I press Save button has 3 date fields and I checked the properties of them and they are Date only.
    I also generated to object list report and tried to find some answer, but no use.
    Please help me in debugging this form.
    Edited by: Charan on Aug 18, 2011 4:05 PM

    I think you need to get a description of the table and compare all the «database» columns in the form with the ones in the database table to see that the types match. Somewhere there’s a mismatch. Also check the block(s) «query data source columns» and see if there’s any
    columns in there that the type does not match the table. (check the sizes of things too while you’re at it.)

  • Frm-40502: oracle error: unable to read list of values

    Hi All,
    I am personalizing the assignment form, where we need to restrict the JOB LOV based on Organization value.
    In Forms Personalization we are creating the record group from query and attaching to Job field.
    The query is,
    SELECT DISTINCT j.NAME, DECODE (1, 2, 1, NULL) c_valid_job_flag,
    j.job_id job_id
    FROM per_jobs_v j
    WHERE j.business_group_id + 0 = :CTL_GLOBALS.BUSINESS_GROUP_ID
    AND j.date_from <= :CTL_GLOBALS.SESSION_DATE
    AND ( (j.date_to IS NULL)
    OR (j.date_to >= :CTL_GLOBALS.SESSION_DATE)
    ORDER BY j.NAME
    When we use this query, we are getting the error «frm-40502: oracle error: unable to read list of values»
    If i replace the bind variable with values we are not getting the error and its working fine.
    Replace query:
    SELECT DISTINCT j.NAME, DECODE (1, 2, 1, NULL) c_valid_job_flag,
    j.job_id job_id
    FROM per_jobs_v j
    WHERE j.business_group_id + 0 = 202
    AND j.date_from <= TRUNC(SYSDATE)
    AND ( (j.date_to IS NULL)
    OR (j.date_to >= TRUNC(SYSDATE))
    ORDER BY j.NAME
    how to use bind variables (Block.field) here? We are getting this error only when using the bind variable in the query.
    Please share your ideas.
    Thanks.

    Hi;
    What is your EBS version? There are 96 docs avaliable about similar error message. I suggest use metalink for your issue
    You can also check:
    FRM-40502: Oracle Error: Unable To Read List Of Values [ID 1161404.1]
    Frm-40502: Oracle Error: Unable To Read List Of Values. [ID 351931.1]
    FRM 40502: Oracle Error:Unable to Read List of Values [ID 179162.1]
    Regard
    Helios

  • Forms Personalization — FRM-40502: ORACLE error: unable to read list of val

    Hi,
    I am using Forms Personalization to create an LOV using builtin. In the Builtin, I have put the sql query under create record group from query. In the query, when I hardcode a value, in a where condition, the LOV works fine but when I replace the hardcoded value with :block.field value, it gives the error, FRM-40502: ORACLE error: unable to read list of values. Below is the part of the sql query where I am facing this issue.
    «WHERE related_customer_id = :ORDER.INVOICE_TO_CUSTOMER_ID»
    Please get back to me if anyone has faced similar problem.
    Thanks all in advance,
    Regards,
    AN

    Please post a new thread for each issue. Tacking onto a 2 year old post is generally a bad idea.
    Forms personalization is a feature in Oracle E+Biz Suite and as such you should post your question in this forum:
    OA Framework

  • About the FRM-40508 ORACLE ERROR, Unable to insert’

    Dear Friends:
    I use the Toolbar button to insert one record — do_key(‘CREATE_RECORD’) in the Toolbar_actions procedure, and then, input the value for this record, and then, click the «Save» button — commit_form; in the when_button_pressed trigger. There will be the problem FRM-40508 ORACLE ERROR, Unable to insert’ .
    Please kindly help to fix it………..

    Hi,
    See…just for a test, please give whatever u input in the form, give the same in the sql query
    like
    insert into tablename etc in sql builder and see what happens,
    This error will come,
    if input value does not meet the datatype in the table or
    if u fail to input value for not null column or
    access rights pbm(check whether you have rights to insert in to the table)
    Regards
    Priya

  • «FRM-40501: Oracle error: Unable to Reserve Record For Update or Delete»

    «FRM-40501: Oracle error: Unable to Reserve Record For Update or Delete»
    as I can unblock a session in the graphical surroundings of administration of the BD 10g of Oracle

    From experience with this problem since the blocked customer form has been coded not to wait for the updating session to complete then there is likely no waiter on the system now so you cannot find the blocking session.
    What you need to do is determine what row the Form was going after then using SQLPlus issue an update on the row. If the blocking session has not yet committed then this update will wait. Now if you look for blocking sessions you will be able to find it and make a determination if the session should be killed or if someone needs to call the user and ask he or she to flip through their screens and get out of the blocking screen.
    Applications screens written not to wait on currently being updated data need to also be written to expose the information necessary to identify the row(s) in question.
    HTH — Mark D Powell —

  • FRM-40509: ORACLE error: unable to UPDATE record.

    FRM-40509: ORACLE error: unable to UPDATE record.
    what can i do?

    There will always be another error which tells you what the actual problem on the database is. Use the Display message key, or message out DBMS_ERROR_TEXT

  • FRM-40506: Oracle error: unable to check for record uniqueness

    Hello everyone
    I have an emergency problom. the context is:
    I have a master -detail structure in a form. first, my detail is a tabulation view, so it has severals records. Then, when i try to commit the form ii received the message <<<FRM-40506: Oracle error: unable to check for record uniqueness>>.
    i made a test by changing the detail block presentation to Form. and i could save because my detail has one record.
    Could someone has any idea how can I save my master-detail form with severals records in my detail.
    Master
    [code_p] [non_P]
    Detail
    [code_p] [product1]
    [code_p] [product2]
    [code_p] product3]
    [code_p] [productn]
    thanks!

    Error Cause:
    Processing error encountered while checking a record’s primary key items for uniqueness. The table associated with the current block of the form does not exist, or you do not have authority to access the table.
    You can review the error documentation:
    http://www.errorpro.com/oracleerrors/oraerror.php?level1=Oracle&send=Send&ecode=FRM-40506&Submit=Search

  • FRM-40501 ORACLE error: unable to reserve record for update or delete when

    Hello.
    I have two tab pages and one item on each page. Second tab page item, is mirror item of the first one. I use synchronize property on the mirrored one.
    When i try to update mirrored one i get that error: FRM-40501 ORACLE error: unable to reserve record for update or delete when.
    How can i solve that?
    Thanks

    hi dejan,
    the error u r getting means that the record cannot be locked. This is ussually caused if u had locked the record from somewhere else (u or another user) or when forms cannot find corresponding column to the base table to lock the record.. U probably r facing the second situation. I’m not sure that forms can commit a change to an item that is synchronized cause synchronized items ignore their base table attribute and just copy their value from the other item.
    Why don’t u try Copy Value from Item property using <block_name>.<item_name> syntax and your item will have a value copied from the other item but u will have no problem with the db transactions. I suppose..
    hope this helps,
    teo

  • FRM-40512 ORACLE ERROR UNABLE TO ISSUE SAVE POINT COMAND

    Dear Friends
    I am getting this FRM-99999 ERRORE 408 OCCURRED FRM-40655 SQL ERROR FORCED ROLLBACK CLEAR FROM AND RE-ENTER TRANACTION.
    FRM-40512 ORACLE ERROR UNABLE TO ISSUE SAVE POINT COMAND.
    I am calling the form using the following script :
    :global.command_line := ‘C:SALESNEW_ITEMS.FMX’ ;
    CALL_FORM(:global.command_line);
    go_block(‘COP_ORDER_DETAILS’);
    go_record(:global.l_n_curr_rec2);
    :COP_ORDER_DETAILS.ITEM_CODE :=:GLOBAL.ITEM_CODE_VAR;
    :COP_ORDER_DETAILS.COLOR := :GLOBAL.COLOR_CODE ;
    :COP_ORDER_DETAILS.SHAPE_CODE := :GLOBAL.SHAPE_CODE ;
    :COP_ORDER_DETAILS.DELIVERY_QUANTITY := :GLOBAL.QTY ;
    :COP_ORDER_DETAILS.VOLUME := :GLOBAL.VOLUME;
    It works fine for one record, when I try to create another record by calling the called form it gives the above messages.
    Waiting for your valuable replay.
    Best regards
    Jamil

    Hi!
    May you try to open your form, compile all pl/sql (shift-ctrl-k) and compile the form (ctrl-t).
    Take a look at triggers like pre-insert, on-insert, post-insert and key-commit.
    What’s happen there?
    I don’t know, if the default username feature in 10g is still supported.
    So may the logon ( ‘/’ …) fails and for this the login screen os shown.
    Regards

  • FRM-40509: ORACLE error : Unable to update the record.

    Hi,
    I am having the following code in delete button.
    declare
         v_button  NUMBER;
    begin
      IF :CHNG_CNTRL_JOB_DTLS.SENT_DATE IS NULL THEN
                   v_button := fn_display_warning_alert( ‘Do you want to delete the version ?’);
                   IF ( v_button = alert_button1 )
                        THEN
                          message(‘before insert’);
                          insert into chng_cntrl_job_dtls_log
                          select * from chng_cntrl_job_dtls
                          where job_name = :CHNG_CNTRL_JOB_DTLS.job_name
                          and job_version_no = :CHNG_CNTRL_JOB_DTLS.job_version_no
                          and sent_date is null;
                          message(‘before delete’);
                          delete from CHNG_CNTRL_JOB_DTLS
                          where job_name = :CHNG_CNTRL_JOB_DTLS.job_name
                          and job_version_no = :CHNG_CNTRL_JOB_DTLS.job_version_no
                          and sent_date is null;
                          message(‘before commit’);
                          silent_commit;
                          go_item(‘CHNG_CNTRL_JOB_DTLS.JOB_NAME’);
                          P_DELETE_SET_PROPERTY;
                          clear_form;
                   ELSIF ( v_button = alert_button2 )
                        THEN
                          null;
                END IF;
         ELSE
                p_display_alert(‘Version ‘||:CHNG_CNTRL_JOB_DTLS.JOB_VERSION_NO||’ for the job name ‘||:CHNG_CNTRL_JOB_DTLS.JOB_NAME||’ cannot be deleted.’,’I’);
      END IF;
         exception
              when others then
              message (‘Exception in delete version button’);
              end;when i am trying to save it says » *FRM-40509: ORACLE error : Unable to update the record*.» .
    i am getting message till before commit.
    i am not able to check the error message in help as it is diabled in our form builder.
    I have checked the privileges also. they are fine.
    Please advice.
    Edited by: Sudhir on Dec 7, 2010 12:26 PM

    This error does not come from your procedure code, but from Forms itself. If you are in a database block, change something, and do a commit (either via a Forms key or in your own procedure), Forms commits the changes. For some reason this is not possible. You can see the database error via the Display Error key (often Shift-F1).
    I see in the OP that this key is disabled. Change the on-error code then:
    begin
       message(dbms_error_code||’-‘||dbms_error_text);
       raise form_trigger_failure;     
    end;     Edited by: InoL on Dec 7, 2010 8:50 AM

  • Getting error Unable to perform transaction on the record.

    Hi,
    My requirement is to implement the custom attachment, and to store the data into custom lob table.
    my custom table structure is similer to that of standard fnd_lobs table and have inserted the data through EO based VO.
    Structure of custom table
    CREATE TABLE XXAPL.XXAPL_LOBS
    ATTACHMENT_ID NUMBER NOT NULL,
    FILE_NAME VARCHAR2(256 BYTE),
    FILE_CONTENT_TYPE VARCHAR2(256 BYTE) NOT NULL,
    FILE_DATA BLOB,
    UPLOAD_DATE DATE,
    EXPIRATION_DATE DATE,
    PROGRAM_NAME VARCHAR2(32 BYTE),
    PROGRAM_TAG VARCHAR2(32 BYTE),
    LANGUAGE VARCHAR2(4 BYTE) DEFAULT ( userenv ( ‘LANG’) ),
    ORACLE_CHARSET VARCHAR2(30 BYTE) DEFAULT ( substr ( userenv ( ‘LANGUAGE’) , instr ( userenv ( ‘LANGUAGE’) , ‘.’) +1 ) ),
    FILE_FORMAT VARCHAR2(10 BYTE) NOT NULL
    i have created a simple messegefileupload and submit button on my custom page and written below code on CO:
    Process Request Code:
    if(!pageContext.isBackNavigationFired(false))
    TransactionUnitHelper.startTransactionUnit(pageContext, «AttachmentCreateTxn»);
    if(!pageContext.isFormSubmission()){
    System.out.println(«In ProcessRequest of AplAttachmentCO»);
    am.invokeMethod(«initAplAttachment»);
    else
    if(!TransactionUnitHelper.isTransactionUnitInProgress(pageContext, «AttachmentCreateTxn», true))
    OADialogPage dialogPage = new OADialogPage(NAVIGATION_ERROR);
    pageContext.redirectToDialogPage(dialogPage);
    ProcessFormRequest Code:
    if (pageContext.getParameter(«Upload») != null)
    DataObject fileUploadData = (DataObject)pageContext.getNamedDataObject(«FileItem»);
    String strFileName = null;
    strFileName = pageContext.getParameter(«FileItem»);
    if(strFileName == null || «».equals(strFileName))
    throw new OAException(«Please select a File for upload»);
    fileName = strFileName;
    contentType = (String)fileUploadData.selectValue(null, «UPLOAD_FILE_MIME_TYPE»);
    BlobDomain uploadedByteStream = (BlobDomain)fileUploadData.selectValue(null, fileName);
    String strItemDescr = pageContext.getParameter(«ItemDesc»);
    OAFormValueBean bean = (OAFormValueBean)webBean.findIndexedChildRecursive(«AttachmentId»);
    String strAttachId = (String)bean.getValue(pageContext);
    System.out.println(«Attachment Id:» +strAttachId);
    int aInt = Integer.parseInt(strAttachId);
    Number numAttachId = new Number(aInt);
    Serializable[] methodParams = {fileName, contentType , uploadedByteStream , strItemDescr , numAttachId};
    Class[] methodParamTypes = {fileName.getClass(), contentType.getClass() , uploadedByteStream.getClass() , strItemDescr.getClass() , numAttachId.getClass()};
    am.invokeMethod(«setUploadFileRowData», methodParams, methodParamTypes);
    am.invokeMethod(«apply»);
    System.out.println(«Records committed in lobs table»);
    if (pageContext.getParameter(«AddAnother») != null)
    pageContext.forwardImmediatelyToCurrentPage(null,
    true, // retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES);
    if (pageContext.getParameter(«cancel») != null)
    am.invokeMethod(«rollbackShipment»);
    TransactionUnitHelper.endTransactionUnit(pageContext, «AttachmentCreateTxn»);
    Code in AM:
    public void apply(){
    getTransaction().commit();
    public void initAplAttachment() {
    OAViewObject lobsvo = (OAViewObject)getAplLobsAttachVO1();
    if (!lobsvo.isPreparedForExecution())
    lobsvo.executeQuery();
    Row row = lobsvo.createRow();
    lobsvo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    public void setUploadFileRowData(String fName, String fContentType, BlobDomain fileData , String fItemDescr , Number fAttachId)
    AplLobsAttachVOImpl VOImpl = (AplLobsAttachVOImpl)getAplLobsAttachVO1();
    System.out.println(«In setUploadFileRowData method»);
    System.out.println(«In setUploadFileRowData method fAttachId: «+fAttachId);
    System.out.println(«In setUploadFileRowData method fName: «+fName);
    System.out.println(«In setUploadFileRowData method fContentType: «+fContentType);
    RowSetIterator rowIter = VOImpl.createRowSetIterator(«rowIter»);
    while (rowIter.hasNext())
    AplLobsAttachVORowImpl viewRow = (AplLobsAttachVORowImpl)rowIter.next();
    viewRow.setFileContentType(fContentType);
    viewRow.setFileData(fileData);
    viewRow.setFileFormat(«IGNORE»);
    viewRow.setFileName(fName);
    rowIter.closeRowSetIterator();
    System.out.println(«setting on fndlobs done»);
    The attchemnt id is the sequence generated number, and its defaulting logic is written in EO
    public void create(AttributeList attributeList) {
    super.create(attributeList);
    OADBTransaction transaction = getOADBTransaction();
    Number attachmentId = transaction.getSequenceValue(«xxapl_po_ship_attch_s»);
    setAttachmentId(attachmentId);
    public void setAttachmentId(Number value) {
    System.out.println(«In ShipmentsEOImpl value::»+value);
    if (getAttachmentId() != null)
    System.out.println(«In AplLobsAttachEOImpl AttachmentId::»+(Number)getAttachmentId());
    throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,
    getEntityDef().getFullName(), // EO name
    getPrimaryKey(), // EO PK
    «AttachmentId», // Attribute Name
    value, // Attribute value
    «AK», // Message product short name
    «FWK_TBX_T_EMP_ID_NO_UPDATE»); // Message name
    if (value != null)
    // Attachment ID must be unique. To verify this, you must check both the
    // entity cache and the database. In this case, it’s appropriate
    // to use findByPrimaryKey() because you’re unlikely to get a match, and
    // and are therefore unlikely to pull a bunch of large objects into memory.
    // Note that findByPrimaryKey() is guaranteed to check all AplLobsAttachment.
    // First it checks the entity cache, then it checks the database.
    OADBTransaction transaction = getOADBTransaction();
    Object[] attachmentKey = {value};
    EntityDefImpl attachDefinition = AplLobsAttachEOImpl.getDefinitionObject();
    AplLobsAttachEOImpl attachment =
    (AplLobsAttachEOImpl)attachDefinition.findByPrimaryKey(transaction, new Key(attachmentKey));
    if (attachment != null)
    throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,
    getEntityDef().getFullName(), // EO name
    getPrimaryKey(), // EO PK
    «AttachmentId», // Attribute Name
    value, // Attribute value
    «AK», // Message product short name
    «FWK_TBX_T_EMP_ID_UNIQUE»); // Message name
    setAttributeInternal(ATTACHMENTID, value);
    Issue faced:
    When i run the page for the first time data gets inserted into custom table perfectly on clicking upload button,
    but when clicked on add another button on the same page (which basically redirects to the same upload page and increments the attachment id by 1)
    i am getting the below error:
    Error
    Unable to perform transaction on the record.
    Cause: The record contains stale data. The record has been modified by another user.
    Action: Cancel the transaction and re-query the record to get the new data.
    Have spent entire day to resolve this issue but no luck.
    Any help on this will be appreciated, let me know if i am going wrong anywhere.
    Thanks nd Regards
    Avinash

    Hi,
    After, inserting the values please re-execute the VO query.
    Also, try to redirect the page with no AM retension
    Thanks,
    Gaurav

  • Exact fetch returns more than requested number of rows oracle error ; unable to find where exactly throwing error in the below code.

    hi i am receiving «exact fetch returns more than requested number of rows oracle error». but i am not able to locate the error in the below code. Any help would be appreciated!!!
    CREATE OR REPLACE PROCEDURE load_scene_collection_item (
    —pdname                                  VARCHAR2,
    — LOCATION TO ADD/CHANGE below!!!
    pITEM_TYPE_ID                      INTEGER,
    pSCENE_COLLECTION_ID        INTEGER,
    pCOLLECTION_ITEM_NAME     VARCHAR2,
    pCOLLECTION_ITEM_DESC      VARCHAR2,
    pDEFAULT_COORD_X      NUMBER,
    pDEFAULT_COORD_Y      NUMBER,
    pDEFAULT_COORD_Z      NUMBER,
    pDEFAULT_WIDTH            NUMBER,
    pDEFAULT_HEIGHT            NUMBER,
    pDEFAULT_ROTATION      INTEGER,
    pDEFAULT_ALPHA            INTEGER,
    pfname                                 VARCHAR2)    IS
    src_file BFILE;
    dst_file BLOB;
    lgh_file BINARY_INTEGER;
    BEGIN
    src_file := bfilename(‘BUSINESSBLOBSIMAGES’, pfname);
    — insert a NULL record to lock
    Insert into SCENE_COLLECTION_ITEM
       ( ITEM_TYPE_ID,
       SCENE_COLLECTION_ID,
       COLLECTION_ITEM_NAME,
       COLLECTION_ITEM_DESC,
        COLLECTION_ITEM_IMAGE,
       DEFAULT_COORD_X,
       DEFAULT_COORD_Y,
       DEFAULT_COORD_Z,
       DEFAULT_WIDTH,
       DEFAULT_HEIGHT,
       DEFAULT_ROTATION,
       DEFAULT_ALPHA,
        CREATE_USER,
        CREATE_DATE)
    Values    ( pITEM_TYPE_ID, pSCENE_COLLECTION_ID, pCOLLECTION_ITEM_NAME, pCOLLECTION_ITEM_DESC, EMPTY_BLOB(),   
       pDEFAULT_COORD_X,
       pDEFAULT_COORD_Y,
       pDEFAULT_COORD_Z,
       pDEFAULT_WIDTH,
       pDEFAULT_HEIGHT,
       pDEFAULT_ROTATION,
       pDEFAULT_ALPHA,  
    sys_context(‘USERENV’, ‘OS_USER’), 
    sys_extract_utc(systimestamp))
    RETURNING COLLECTION_ITEM_IMAGE INTO dst_file;
    — LOCATIONs(2) TO ADD/CHANGE above!!!
    — lock record
    SELECT COLLECTION_ITEM_IMAGE
    INTO dst_file
    FROM SCENE_COLLECTION_ITEM
    WHERE ITEM_TYPE_ID     = pITEM_TYPE_ID
    AND SCENE_COLLECTION_ID = pSCENE_COLLECTION_ID
    AND COLLECTION_ITEM_NAME= pCOLLECTION_ITEM_NAME
    AND COLLECTION_ITEM_DESC= pCOLLECTION_ITEM_DESC
    AND    pDEFAULT_COORD_X = DEFAULT_COORD_X
    AND   pDEFAULT_COORD_Y  = DEFAULT_COORD_Y
    AND   pDEFAULT_COORD_Z  = DEFAULT_COORD_Z
    AND   pDEFAULT_WIDTH    = DEFAULT_WIDTH
    AND   pDEFAULT_HEIGHT   = DEFAULT_HEIGHT
    AND   pDEFAULT_ROTATION = DEFAULT_ROTATION
    AND   pDEFAULT_ALPHA    = DEFAULT_ALPHA
    FOR UPDATE;
    — LOCATION TO ADD/CHANGE above!!!
    — open the file
    dbms_lob.fileopen(src_file, dbms_lob.file_readonly);
    — determine length
    lgh_file := dbms_lob.getlength(src_file);
    — read the file
    dbms_lob.loadfromfile(dst_file, src_file, lgh_file);
    — update the blob field
    UPDATE SCENE_COLLECTION_ITEM
    SET COLLECTION_ITEM_IMAGE = dst_file
    WHERE ITEM_TYPE_ID     = pITEM_TYPE_ID
    AND SCENE_COLLECTION_ID = pSCENE_COLLECTION_ID
    AND COLLECTION_ITEM_NAME= pCOLLECTION_ITEM_NAME
    AND COLLECTION_ITEM_DESC= pCOLLECTION_ITEM_DESC
    AND    pDEFAULT_COORD_X = DEFAULT_COORD_X
    AND   pDEFAULT_COORD_Y  = DEFAULT_COORD_Y
    AND   pDEFAULT_COORD_Z  = DEFAULT_COORD_Z
    AND   pDEFAULT_WIDTH    = DEFAULT_WIDTH
    AND   pDEFAULT_HEIGHT   = DEFAULT_HEIGHT
    AND   pDEFAULT_ROTATION = DEFAULT_ROTATION
    AND   pDEFAULT_ALPHA    = DEFAULT_ALPHA
    — LOCATION TO ADD/CHANGE above!!!
    — close file
    dbms_lob.fileclose(src_file);
    END load_scene_collection_item;
    Thanks in advance!!!!

    Hi PaulHorth,
    Thanks for the quick reply.
    Actually, i am getting  error while updating the records.
    below is the error message:
    Error starting at line 1 in command:
    exec load_scene_collection_item(3,15,’2 Lane 4way Stop’,’4 Way Stop Intersection with 2 lanes in each direction’,0,0,0,400,517,0,1,’2 Lane 4way Stop.PNG’);
    Error report:
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at «DP_OWNER.LOAD_SCENE_COLLECTION_ITEM», line 55
    ORA-06512: at line 1
    01422. 00000 — «exact fetch returns more than requested number of rows»
    *Cause:    The number specified in exact fetch is less than the rows returned.
    *Action:   Rewrite the query or change number of rows requested

Maybe you are looking for

  • Merging user accounts after using Migration Assistant

    I’ve just acquired my first Mac (Lion OS) and set it up without using the Migration Assistant.  I set up mail accounts for my existing email addresses (Gmail & Virgin).  A few days later I decided to transfer my old files from the PC using Migration

  • How to print black and white from my i-phone

    officejet 7500a — printing from i-phone -I want to print doc.s in black or grayscale. I now get only color prints.  how do I chane this.?

  • MSAccess to Oracle 10g Migration Problem

    I have exported an Access 2000 database (2 tables) to XML using Oracle SQL Developer (v1.2.1). It successfully creates However, when I then go to Migration => Capture MS Access Exported XML, I find it is greyed-out and cannot be selected. I then atte

  • How to deal with hum/interference — 30in Cinema display?

    Hi, I hope someone can help with this! I have a 30inch Cinema display, which has started to create a hum through my powered speakers (Genelec 8040’s). I have tried plugging the (mains powered) speakers into a separate mains socket, moving them about,

  • FRM-40010 error: Cannot read from …. .fmx

    FRM-40010 error: Cannot read from ……… .fmx Hi everyone, In my formsweb.cfg file, i have an entry [iapp] userid=login/[email protected] form=Invlogin.fmx I attempted to launch my application from the desktop by clicking an icon that points to the URL htt

Now you will learn how to handle errors raised by each of the four categories.

FORM_SUCCESS and FORM_TRIGGER_FAILURE

Either the FORM_SUCCESS built-in or the FORM_TRIGGER_FAILURE exception must be used to handle all Forms errors. FORM_SUCCESS is a Boolean function that evaluates to TRUE or FALSE depending on the success or failure of a Forms built-in. FORM_TRIGGER_FAILURE is an exception that has to be raised to stop further processing whenever an error occurs or FORM_SUCCESS evaluates to FALSE. The following sections describe their use in error-message handling.

Suppressing Errors Using ON-ERROR and ON-MESSAGE Triggers

The two triggers ON-ERROR and ON-MESSAGE can be used to suppress unnecessary messages of both error and informative types. Here, I will elaborate on the examples discussed earlier in the Error Type section.

Consider the following informative-type error messages:

FRM-40350: Query caused no records to be retrieved.

FRM-40353: Query Cancelled.

These messages can be suppressed by means of an ON-MESSAGE as follows :

ON-MESSAGE



IF MESSAGE_TYPE = 'FRM'AND MESSAGE_CODE IN (40350, 40353) THEN

 NULL;

ELSE

 MESSAGE(MESSAGE_TYPE'-'TO_CHAR(MESSAGE_CODE)': 'MESSAGE_TEXT);

END IF;

This is how informative messages are trapped: You use the ON-MESSAGE trigger with MESSAGE_TYPE, MESSAGE_CODE, and MESSAGE_TEXT. Note the ELSE part. This is a very important part because it ensures that other genuine messages are not suppressed.

Now consider these error-type messages:

FRM-40202: Field must be entered.

FRM-40360: Cannot Query Records here.

FRM-40600: Record has already been inserted.

FRM-40100: At first record.

An ON-ERROR trigger along similar lines as the preceding example can be written with ERROR_TYPE, ERROR_CODE, and ERROR_TEXT to suppress unnecessary error-type errors:

ON-ERROR

IF ERROR_TYPE = 'FRM'AND ERROR_CODE = 40401 THEN

 NULL;

ELSE

 MESSAGE(ERROR_TYPE'-'TO_CHAR(ERROR_CODE)': 'ERROR_TEXT);

END IF;

With ON-MESSAGE and ON-ERROR, you can suppress errors at any severity level because you are trying to replace the default functionality of Forms error-message handling. However, the trigger does not suffice for the purpose of capturing the error unless it is handled.

Tip

The rule of the thumb is to raise FORM_TRIGGER_FAILURE for error-type error messages except those that are being suppressed.

As mentioned earlier, you should always include an ELSE part, such as

ELSE

 MESSAGE(MESSAGE_TYPE'-'TO_CHAR(MESSAGE_CODE)': 'MESSAGE_TEXT);

in ON-MESSAGE and ON-ERROR triggers to prevent other genuine messages from being suppressed.

Errors Raised from the Failure of Forms Built-Ins

FRM errors are errors raised by the failure of Forms built-ins used in trigger or program unit code. An example is the failure of the GO_BLOCK built-in. The code

GO_BLOCK('CUST_ORDERS');

causes the error

FRM-40104: No such block CUST_ORDERS.

All errors occurring because of built-in failures should be trapped by using FORM_SUCCESS followed by a RAISE FORM_TRIGGER_FAILURE. Check form success and form failure for any built-ins by means of the following general procedure, and call this procedure after the call to the built-in:

PROCEDURE check_package_failure

IS

IF NOT FORM_SUCCESS THEN

 RAISE FORM_TRIGGER_FAILURE;

END IF;

END check_package_failure;

Note how FORM_SUCCESS is negated to cover both FORM_FAILURE and FORM_FATAL caused by internal errors (such as memory failures, and so on). Using only FORM_FAILURE and omitting the negation would have served the purpose but not fully, because FORM_FATAL would have been ignored.

The one line of code containing the GO_BLOCK call can be replaced by a line segment as follows:

GO_BLOCK('CUST_XX');

CHECK_PACKAGE_FAILURE;

Errors Raised from the Failure of Forms Object Properties

These FRM errors are caused by form, block, object, or item property failures. A very common example is the error

FRM-40202: Field must be entered.

which is caused by a null value in a mandatory form item, specified by setting the Required item property to True.

Normally, Forms causes an input lockout until the item is filled in with a value, and there is no way to continue further processing except by entering a valid value or exiting the form.

Always, as far as possible, track errors raised by form object properties by simulating them with a WHEN-VALIDATE- trigger (if applicable ) rather than specifying them in the object properties. Otherwise, track them in an ON-ERROR trigger. The former might seem too redundant a task, to write code for what is available ready-made, but the later sections Errors That Cannot Be Tracked by FORM_SUCCESS or FORM_FAILURE and The Inability of the ON-ERROR Trigger to Track Forms Errors explain the disastrous consequences that can result from the insufficiency of the ON-ERROR trigger and FORM_SUCCESS.

As an example, the substituted code for tracking the preceding error can be written as

WHEN-VALIDATE-ITEM



IF NAME_IN('SYSTEM.CURSOR_VALUE') IS NULL THEN

 MESSAGE('This Item Value must be entered.');

 RAISE FORM_TRIGGER_FAILURE;

END IF;

This code can be used to validate any number of NOT NULL items in the form, irrespective of the data type.

Take a look at another typical example. Consider the error

FRM-40505: ORACLE error, unable to perform query.

At first, this might seem the result of one of the following:

  • The base table doesn’t exist.
  • One or more of the base table items do exist, such as an invalid column name .
  • Either one or both of the WHERE and ORDER BY clauses is wrong.
  • Insufficient privileges.

Of course, it is one of these, but how do you figure out which one?

At first sight, capturing this error might seem as trivial as getting the DBMS_ERROR_TEXT in the ON-ERROR trigger (as explained in the Errors Raised on the Server Side and Propagated to Forms section later). Fine. This helps to unearth the actual error message.

The error is a server error propagated to Forms, and it shows up as

ORA-00904: Invalid column name.

Now, what is the cause? All items in the block seem to be valid column names in the underlying base table.

It is surprising to note that the error message and the cause of it seem to be totally unrelated when you see the error message alone. It is very difficult to figure out that one peculiar cause of this error can be the failure of the Forms block property Include REF Item set to YES. The world of objects seems to cause problems for querying.

The Include REF Item property is valid only for blocks having object tables as base tables and not for blocks having items corresponding to OBJECT REFS or column objects.

After all, the error was due to incorrect setting of a block object property.

The Proper Use of FORM_TRIGGER_FAILURE

This section points out a common use of FORM_TRIGGER_FAILURE, which might seem trivial at first but is, in fact, a flaw that can sometimes prove serious. The trick of the trade when using FORM_TRIGGER_FAILURE is that it has to be RAISE d explicitly and then handled by means of an exception handler. Although an exception, it is not raised implicitly, like NO_DATA_FOUND, for example. A good example is to analyze the effect of code segments like the following:

BEGIN

 GO_ITEM(item_name);

EXCEPTION WHEN FORM_TRIGGER_FAILURE THEN

 

END;

Here, the exception is never raised, even when GO_ITEM fails. The correct way is to check for FORM_SUCCESS and then raise FORM_TRIGGER_FAILURE, as follows:

BEGIN

 GO_ITEM(item_name);

 IF NOT FORM_SUCCESS THEN

 RAISE FORM_TRIGGER_FAILURE;

 END IF;

EXCEPTION WHEN FORM_TRIGGER_FAILURE THEN

 

END;

This code illustrates using FORM_TRIGGER_FAILURE in a fool-proof way.

Tip

Don’t expect Forms to do what you can do yourself! Explicitly RAISE FORM_TRIGGER_FAILURE.

FORM_SUCCESS refers only to the success of any code written in Forms triggers, built-ins checked, and Forms side program units. It also refers to form failure caused by an explicit RAISE FORM_TRIGGER_FAILURE. It does not refer to errors resulting from the failure caused by a Forms object property, in which case it may not evaluate to TRUE.

Errors Raised from Exceptions from Triggers and Program Unit Code

Errors raised out of exceptions from triggers and program unit code can be tracked in the exception handler using SQLCODE and SQLERRM. These are SQL and PL/SQL exceptions caused by the failure of SQL DML statements or PL/SQL statements. These are tracked by SQLCODE and SQLERRM in the WHEN OTHERS exception-handling section.

Always give an exception-handling section with the WHEN OTHERS clause, irrespective of whether the trigger or program unit body contains any DML statements. Exceptions do occur because of errors in the declaration section, such as PL/SQL value or numeric errors.

EXCEPTION WHEN OTHERS THEN

 MESSAGE(TO_CHAR(SQLCODE)''SQLERRM);

Errors Raised on the Server Side and Propagated to Forms

Errors raised on the server side and propagated to Forms as a failure of integrity constraints, insufficient privileges on base tables, and so on, arise out of failure of DML statements or semantic checks on the server side. An example is

FRM-40508: ORACLE error: unable to INSERT record.

Also, a user -defined error message given in a stored program unit called from Forms, such as a message in RAISE_APPLICATION_ERROR, can result in the same message, if the same is caused during INSERT.

Although at first it appears that the error is an FRM error and is from Forms, the error is actually propagated from the Oracle server, indicating that an INSERT operation on a base table block failed in the form.

There are two ways to trap this error. You can press the hot key and determine what the resulting error from the database is. This approach makes sense from the programmer’s point of view but not from the end user’s.

You can also programmatically trap the error and replace it with a customized message that is user-friendly. This approach makes sense from either point of view.

You should use DBMS_ERROR_CODE and DBMS_ERROR_TEXT in an ON-ERROR trigger to trap errors propagated from Oracle server from Forms. For example, to trap a message in RAISE_APPLICATION_ERROR in a server-side stored program, which is being called from Forms, you can write an ON-ERROR trigger as follows:

ON-ERROR



DECLARE

 alert_button NUMBER;

 error_msg VARCHAR2(1000)

BEGIN

 error_msg := TO_CHAR(DBMS_ERROR_CODE)''DBMS_ERROR_TEXT;

 SET_ALERT_PROPERTY('ALERT_ERROR',ALERT_MESSAGE_TEXT, error_msg);

 alert_button := SHOW_ALERT('ALERT_ERROR');

END;

This displays an Oracle message string followed by the user message string. You can shorten the message by eliminating the Oracle message string as follows:

error_msg := DBMS_ERROR_TEXT;

error_msg := SUBSTR(error_msg,1,INSTR(error_msg,'ORA-',1,2)-1));

Suppressing Errors Using :SYSTEM.MESSAGE_LEVEL

An alternative way of suppressing unnecessary messages, both informative and error, is by using the system variable :SYSTEM.MESSAGE_LEVEL. This is a read-write system variable, unlike most others provided by Oracle Forms. The following example illustrates this concept:

To suppress the message

FRM-40100: At first record.

or

FRM-40350: Query caused no records to be retrieved.

the following pieces of code describe the technique involved:

/* For suppressing FRM-40100 */

:SYSTEM.MESSAGE_LEVEL := '5';

FIRST_RECORD;

:SYSTEM.MESSAGE_LEVEL := '0';

/* For suppressing FRM-40350 */

:SYSTEM.MESSAGE_LEVEL := '5';

EXECUTE_QUERY;

:SYSTEM.MESSAGE_LEVEL := '0';

The first assignment of :SYSTEM.MESSAGE_LEVEL to 5 is required to suppress all error messages (informative and error) at level 5 and above.

The reassignment of :SYSTEM.MESSAGE_LEVEL to is required to re-enable the default behavior, that is, display all messages when occurring.

Tip

The assigning of :SYSTEM.MESSAGE_LEVEL to a value suppresses all messages at that level or above. The only exception is the one specified earlier: Not all messages with severity levels less than or equal to 25 can be suppressed. Error messages can be suppressed only for errors causing damage that Forms can do away with.

Tip

When you want to suppress a message, use :SYSTEM.MESSAGE_LEVEL or the conventional method, with ON-ERROR. When you want to replace a message, use the conventional method with ON-ERROR. The conventional method is always superior because it eliminates the risk of suppressing unknown messages.

Аннотация: В этой лекции слушатель знакомится с палитрой свойств формы и основными режимами формы Normal, Query и Enter Query Mode. Также в лекции будут рассмотрены настройка файла конфигурации TNSNAMES. ORA и настройка внешнего вида приложения и дизайнера форм.

Цель лекции: обучить слушателя понимать особенности различных режимов формы и назначение свойств формы. Также слушатели научатся конфигурировать файл tnsnames.ora и настраивать внешний вид формы.

Режимы формы

Режим формы – это состояние формы, ассоциированное с определенным действием пользователя. Каждый из режимов накладывает свои ограничения на выполнение различных операций, причем очень важно знать эти ограничения, чтобы избежать возникновения исключительных ситуаций и других непредвиденных ошибок. Форма может находиться в следующих состояниях:

  • Режим ввода запроса – Enter Query Mode ;
  • Нормальный режим – Normal Mode ;
  • Режим запроса – Query Mode.

Для того чтобы узнать, в каком состоянии находится форма в текущий момент, необходимо проверить системную переменную – :SYSTEM.FORM_STATUS.

Enter Query Mode (Режим ввода запроса)

Режим ввода запроса предназначен для ввода критерия поиска данных в БД. Вы можете вводить критерии запроса в любые базовые элементы, поддерживающие этот режим. При работе в этом режиме пользователю:

Разрешено:

  1. выполнение запросов, как с критерием, так и без критерия ограничения выборки;
  2. подсчет записей;
  3. использование Query/Where-диалога;

Запрещено:

  1. перемещение в другие блоки;
  2. выход из приложения;
  3. выполнение операций DML – Insert (Вставка), Delete (Удаление) и Update (Обновление).

Также в режиме Enter Query запрещено выполнение некоторых триггеров. Пользователь при создании приложения может управлять поведением формы и элементов в режиме ввода запроса. На
рис.
4.1 показан пример ограниченного и неограниченного запроса.

Ограниченная и неограниченная выборка

Рис.
4.1.
Ограниченная и неограниченная выборка

Для того чтобы извлечь все данные из таблицы (Unrestricted Query), достаточно выполнить одну из перечисленных операций:

  1. Нажать кнопку Execute Query на панели инструментов Menu Toolbar.
  2. Перевести форму в режим запроса с помощью команды меню Query|Enter Query или нажатием кнопки на панели инструментов Enter Query и выполнить команду Execute Query.
  3. Выполнить команду меню Query|Execute Query.

Для того чтобы выполнить запрос с ограничением, необходимы следующие действия:

  1. Переведите форму в режим запроса.
  2. Установите курсор в любой базовый элемент и введите критерий поиска.
  3. Нажмите кнопку Execute Query на панели инструментов или выполните любое другое действие, ассоциированное с этой командой.

Если в качестве критерия запроса вы введете конкретное значение, то при формировании запроса оно будет интерпретироваться аналогично оператору «AND=критерий». Если же вам необходимо задействовать другие операторы ограничения выборки, такие как Like, IN или Between, то вам необходимо знать специальные символы, которые реализуют эту возможность.

Элемент Символ/критерий Действие
ID 122 Извлекает строку с ID=122, то есть действует аналогично оператору «…and ID=122»
Name %ван Символ «% и _» действует аналогично оператору Like, то есть возвращает все имена, в которых используется сочетание «ван»
ID #BETWEEN 100 AND 122 Символ hash «#» реализует оператор BETWEEN
ID :I (I – :variable_name) Вызывает Query/Where-диалог

Normal Mode (Нормальный режим)

Нормальный режим – это режим, в котором пользователь может вставлять и модифицировать данные БД, то есть выполнять операции DML. Любое действие, которое пользователь выполняет над базовым элементом, интерпретируется как вставка новой записи, удаление или изменение существующей. При работе в этом режиме пользователю:

Разрешено:

  • выполнять операции DML – Insert (Вставка), Delete (Удаление) и Update (Обновление);
  • выполнять запросы без ограничений выборки, то есть извлекать все записи;
  • фиксировать ( commit ) или откатывать ( rollback ) изменения;
  • перемещаться в другие блоки;
  • выходить из приложения – завершать текущую run-time сессию.

Запрещено:

  • выполнение запросов с критерием выборки;
  • вызов Query/Where-диалога.

Нормальный режим, как вы уже, наверно, успели заметить, в отличие от режима Enter Query позволяет пользователю выполнять намного больше функциональных операций. Нормальный режим – это режим по умолчанию. При проектировании формы разработчик может настраивать режимы вручную или программно, переводя ее из одного режима в другой в зависимости от какой-либо ситуации.

Примечание: если вы сделали изменения и не зафиксировали их, то такая операция, как Execute Query, то есть «выполнить запрос», становится недоступной.

Display Error (Отображение ошибок)

Если при выполнении какой либо операции возникает ошибка или исключительная ситуация, которая отображается в строке состояния, то она может быть отображена командой Display Error Help|Display Error.

Окно Display Error

Рис.
4.2.
Окно Display Error

Когда надо использовать такой способ отображения ошибки и в чем его преимущество? Самая главная особенность этого диалога в том, что он отображает не только код, но и весь текст ошибки. Когда вы получаете в строке состояния сообщение об ошибке типа «FRM-40505:Ошибка Oracle: не в состоянии выполнить запрос» или просто необработанное исключение (Unhandled exception), которое по большому счету вам ни о чем не говорит, то, вызвав окно «Display Error», вы получаете более конкретизированный ответ, а именно код и описание причины возникновения ошибки.

Свойства формы

Разрабатывая форму, вы можете управлять не только настройками объектов модуля, но и настройками самого модуля. Большинство свойств модуля глобальны и действительны для всего приложения. Изменяя настройки модуля, вы можете подключать или отключать меню, устанавливать уровень проверки БД. Разработчику доступны следующие свойства для управления настройками формы:

  • Имя (Name) – внутреннее имя формы. Имя формы необязательно должно совпадать с именем модуля.
  • Информация о подклассе (Subclass Information) – в этом свойстве вы можете указать Класс свойств, на котором хотите базировать форму.
  • Окно консоли (Console Window) – в этом свойстве вы указываете окно, в котором будет показана консоль Forms Builder. Если вы зададите для этого свойства значение NULL, то все сообщения, которые вы определили в своей форме, не будут отображаться в статусной строке.
  • Вызвана отсрочка (Defer Required Enforcement) – если значение этого свойства истинно, то проверка всех элементов, имеющих установленный атрибут «Обязательный», будет отложена до тех пор, пока не наступит проверка записи, – то есть до того момента, пока не будет осуществлена проверка записи, свойство «Обязательный» будет отключено.
  • Ограничения на перемещение мышью (Mouse Navigation Limit) – в этом свойстве вы можете задать область перемещения мыши относительно текущего объекта. По умолчанию текущее значение – «Форма». Ниже перечислены объекты ограничения:

    • Форма;
    • Блок Данных;
    • Запись;
    • Элемент.
  • Первый Блок Данных при перемещении (First Navigation Data Block) – в этом свойстве вы можете задать блок, к которому будет выполнена навигация при запуске формы или при ее очистке, то есть после выполнения процедуры CLEAR_FORM. Если значение этого свойства установлено в NULL, то Forms выполнит навигацию к блоку, который размещен в списке блоков Данных под номером один или к блоку, навигация к которому задана в триггере WHEN-NEW-FORM-INSTANCE.
  • Группа Атрибутов Визуализации Текущей Записи – имя именованного атрибута визуализации, который используется, когда элемент входит в текущую запись.
  • Уровень проверки – определяет область проверки формы во время выполнения. Вы можете устанавливать следующие уровни проверки формы во время выполнения:

    • По умолчанию;
    • Форма;
    • Блок Данных;
    • Запись;
    • Элемент.
  • Режим Взаимодействия – устанавливает режим блокирования для взаимодействия с Базой Данных.
  • Максимальное Время Запроса – в этом свойстве вы можете определить максимальное время, которое форма будет ожидать выполнения запроса, после чего выполнит прерывание.
  • Максимум Выбранных Записей – это свойство определяет максимальное число выбранных записей, после чего выполнение запроса будет прервано.
  • Режим Изоляции (Isolation Mode) – уровень изоляции транзакции.
  • Канва с Горизонтальной/Вертикальной Панелью Инструментов – это свойство характерно только для окна MDI, так как выводит для него горизонтальную/вертикальную панель инструментов.
  • Направление – задает направление текста «Слева направо» или «Справа налево», другими словами, определяет позицию курсора ввода.

Выбор системы координат

Используя Палитру Свойств, вы можете определять, в какой системе координат даны размеры и позиции в символьных ячейках. Чтобы определить систему координат для формы, выполните следующие действия:

  1. Находясь в Навигаторе Объектов, запустите Палитру свойств модуля формы.
  2. Найдите и выберите свойство «Система координат» для вызова окна «Информация о координатах» (
    рис.
    4.3.).

    Окно "Информация о координатах"

    Рис.
    4.3.
    Окно «Информация о координатах»

  3. В поле «Система координат» вы можете выбрать тип системы – Абсолютная (Real) или Символьная (Character). Единицы измерения доступны только для абсолютной системы координат, что же касается Символьной системы, то тут вы ограничиваетесь заданием ширины и высоты символьной ячейки. В Символьной системе координат единицы измерения не используются. В абсолютной системе координат возможны следующие единицы измерения:
    • пиксел;
    • сантиметр;
    • дюйм;
    • пункт;
    • десятичная точка.
  4. Выберите Абсолютную систему координат, а в качестве единицы измерения – Пиксел.
  5. При выборе значения выключателя «Масштабирование шрифта по умолчанию» установки высоты и ширины символьной ячейки становятся недоступными. Если значение выбрано, Forms самостоятельно выполняет масштабирование шрифта.
  6. Отмените выбор «Масштабирования шрифта по умолчанию» и установите ширину ячейки, равную 7, а высоту – 14.

Для того чтобы изменения вступили в силу, нажмите кнопку «ОК» – или нажмите кнопку «Отмена», чтобы вернуть значения по умолчанию.

У меня есть 2 таблицы: product с первичным ключом product_id и Review с product_id, который ссылается на product_id таблицы product; Я создал для них мастер-деталь формы, но при выполнении оказываюсь внизу страницы:

FRM-40505: Ошибка ORACLE: невозможно выполнить запрос

И при нажатии ctrl + shift + e получаю:

SELECT ROWID, REVIEW_ID, LIKE, DISLIKE, FIRST_NAME, LAST_NAME, PRODUCT_ID 
  FROM U1.REVIEW WHERE (PRODUCT_ID=:1)

ORA-00936: missing expression

Как это решить? что не так? заранее спасибо

1 ответ

Лучший ответ

Кажется, у вас есть поле с именем like в вашем блоке с базовой таблицей с именем review, для которой Database Item установлено значение Yes в палитре свойств, и по этой причине Oracle рассматривает это поле как если столбец таблицы, но такого столбца нет, и невозможно иметь столбец с именем like в таблице db, поскольку это зарезервированное ключевое слово.


5

Barbaros Özhan
28 Май 2019 в 14:17

  • Error message: FRM-1808: unable to load the following items

    Hi gurus

    I copied the forms of my server on my local machine and got the following message when I try to open this form:

    Message

    FRM-1808: unable to load the following items.

    Source Module: test_property_class.fmb
    Source object: J_OBJ_GRP

    After that, I see another message to fix some PL/SQL libraries, now I have a plan to fix the missing library, but I don’t know how to get rid of the message above…

    Appreciate your help. Thanks in advance.

    Concerning

    Muzz

    Forms is unable to find your form tamplate and your PLL.

    Check FORMS_PATH (in the registry) and add the appropriate paths where to find them.

  • FRM-30312: unable to compile the library in R12

    Hi all

    I want to compile a library of custom in R12. After that I have compiled, a strange error has occurred… Some packages are not available. So I decided to compile a standard library (JE.pll) and the error occurred again. If I wrote $FORMS60_PATH echo nothing appeared. I have to add the path that contains the libraries?

    This is the command I executed
    —————————————————

    frmcmp_batch ${1} .pll userid = module_type output_file=/u01/oracle/DESA/apps/apps_st/appl/xbol/12.0.0/resource/${1}.plx APPS/APPS = LIBRARY

    This is the error:
    ————————

    10.1 forms (form of the compiler) Version 10.1.2.3.0 (Production)

    10.1 forms (form compiler): Release-Production

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 — 64 bit Production
    With partitioning, OLAP, Data Mining and Real Application Testing options
    PL/SQL Version 10.1.0.5.0 (Production)
    Oracle V10.1.2.3.0 — Production procedure generator
    Oracle 10.1.2.0.0 graphic virtual system Version (Production)
    Oracle Multimedia Version 10.1.2.0.2 (Production)
    Oracle tools integration Version 10.1.2.0.2 (Production)
    Common tools Oracle area Version 10.1.2.0.2
    Oracle CORE Production 10.1.0.5.0
    Compile the library I…
    Compile the package Spec JEZZ_GL…
    Compile the package Spec JEZZ_AR…
    Compile the package Spec JEZZ_AP…
    Compile the package Spec JEZZ…
    Compile the package Spec JESK_AP…
    Compile the package Spec JERU_SH…
    Compile the package Spec JERU_GL…
    Compile the package Spec JERU_CE…
    Compile the package Spec JERU_AR…
    Compile the package Spec JERU_AP…
    Compile the package Spec JEPT_AR…
    Compile the package Spec JEPL_AR…
    Compile the package Spec JEIT_AP…
    Compile the package Spec JEHU_AP…
    Compile the package Spec JEES_AR…
    Compile the package Spec JEES_AP…
    Compile the package Spec JECZ_AP…
    Compile the package Spec I…
    Compilation of the Package JEZZ_GL body…
    Compilation of the Package JEZZ_AR body…
    Compilation of the Package JEZZ_AP body…
    The body of Package JEZZ compiling…
    Compilation of the Package JESK_AP body…
    Compilation of the Package JERU_SH body…
    Compilation of the Package JERU_GL body…
    Compilation of the Package JERU_CE body…
    Compilation of the Package JERU_AR body…
    Compilation of the Package JERU_AP body…
    Compilation of the Package JEPT_AR body…
    Compilation of the Package JEPL_AR body…
    Compilation of the Package JEIT_AP body…
    Compilation of the Package JEHU_AP body…
    Compilation of the Package JEES_AR body…
    Compilation of the Package JEES_AP body…
    Compilation of the Package JECZ_AP body…
    Compilation of the body of Package I…
    FRM-30312: unable to compile the library.

    Thanks Mariano. -.

    Hello

    What do you mean ¨instead¨? That it is not necessary to set the FORMS60_PATH?.

    If you’re on 11i, you must check the value of FORMS60_PATH

    If you’re on R12, you must check the value of FORMS_PATH

    In addition, I sent an email to DBA in order to know if we have invalid objects, but I need to insist that the library is standard (JE.pll).

    Just make sure you can get this error FRM if you have invalid objects that may apply.

    Thank you
    Hussein

  • FRm-40741: unable to locate the plug on block 11

    Hi all

    I use this custom property defined when press the button Search «FRm-40741: unable to locate the plug on block 11» error getting.

    If: XXEAM_SHUTDOWN_DETAILS. WF_STATUS = «Not sent yet!» then
    Set_Custom_Property(‘XXEAM_SHUTDOWN_DETAILS.) WORK_ORDER_NO’,: SYSTEM. TRIGGER_RECORD, «ENABLED», TRUE);
    Set_Custom_Property(‘XXEAM_SHUTDOWN_DETAILS.) ESTIMATED_START_DATE’,: SYSTEM. TRIGGER_RECORD, «ENABLED», TRUE);
    end if;

    Please give me any other property for record wise work instead of Set_Custom_Property.

    Kind regards
    Maha

    Finally, I had a few minutes to play with my sample form and found out that Andreas is correct when he said:

    SET_CUSTOM_PROPERTY does not have the number of the logical record as a parameter, but ‘the physical line number’ in the layout.

    In my example of form, as I scrolled items folders «Enabled» has not changed with the records.

    *@Maha,* my apologies. In order to apply the desired effect, you will have to imitate the enabled property for each record by using a combination of the Set_Item_Instance_Property() WATERWAY integrated, INSERT_ALLOWED, UPDATE_ALLOWED and VISUAL_ATTRIBUTE (optional) properties. Because you change many properties, I so wrap it in a procedure called ENABLE_ITEM and past the point, the file number and activate settings. For example:

    /* This procedure assumes you have a VISUAL_ATTRIBUTE                 */
    /* created called 'ENABLED' and 'DISABLED'.  In my example,           */
    /* I created the DISABLED visual attribute with following properties: */
    /*  Foreground Color = DarkGray                                       */
    /*  Background Color = gray12                                         */
    /* The ENABLED visual attribute does not specify any properties so it */
    /* sets the above properties back to                     */
    PROCEDURE enable_item (inItem VARCHAR2, inRecord NUMBER, inEnabled BOOLEAN )IS
         paramCount     NUMBER := 0;
    BEGIN
         IF ( inEnabled ) THEN
              Set_Item_Instance_Property(inItem, inRecord, INSERT_ALLOWED, PROPERTY_TRUE);
              Set_Item_Instance_Property(inItem, inRecord, UPDATE_ALLOWED, PROPERTY_TRUE);
              Set_Item_Instance_Property(inItem, inRecord, NAVIGABLE, PROPERTY_TRUE);
              Set_Item_Instance_Property(inItem, inRecord, VISUAL_ATTRIBUTE, 'ENABLED');
         ELSE
               Set_Item_Instance_Property(inItem, inRecord, INSERT_ALLOWED, PROPERTY_FALSE);
              Set_Item_Instance_Property(inItem, inRecord, UPDATE_ALLOWED, PROPERTY_FALSE);
              Set_Item_Instance_Property(inItem, inRecord, NAVIGABLE, PROPERTY_FALSE);
              Set_Item_Instance_Property(inItem, inRecord, VISUAL_ATTRIBUTE, 'DISABLED');
      END IF;
    END enable_item;
    

    You then call the ENABLE_ITEM procedure in your code, passing the name, registration number and activate (true or false) disable your element. For example:

    If :XXEAM_SHUTDOWN_DETAILS.WF_STATUS = 'Not Submited Yet!' then
       enable_item('XXEAM_SHUTDOWN_DETAILS.WORK_ORDER_NO', :SYSTEM.TRIGGER_RECORD, TRUE);
       enable_item('XXEAM_SHUTDOWN_DETAILS.ESTIMATED_START_DATE',:SYSTEM.TRIGGER_RECORD, TRUE);
    end if;
    

    Options François and Steve mentioned are also good ways to do this as well.

    Sorry if I confused the issue earlier.

    For those who suggested to use SET_ITEM_PROPERTY(‘BLOCK_NAME.) Nom_element’, ACTIVE, PROPERTY_FALSE), do not forget the cascade effect of assigning false to the ENABLED property of an element. When you ACTIVATE your story later, you must also set the properties MODIFIABLES NAVIGABLE, UPDATE_NULL, true.

    Craig…

    Published by: Silvere on 16 January 2013 14:15

  • How to implement enter and execute the query in the ADF

    I’m new to ADF and I’m trying to create a simple data entry in ADF 11 g based on a database table. I’m looking to implement the equivalent of the request function enter and execute the query in Oracle Forms. I tried the default operations that are available with the data controls. But they don’t seem to have this feature. Can someone help / tell me how this can be implemented.

    Thank you
    Srini.

    How to add a query Panel? Who has the most benefits that the use of Find.

    More info on af:query

    http://docs.Oracle.com/CD/E28389_01/apirefs.1111/e12419/tagdoc/af_query.html

    Arun-

  • 0 x 81000203 error code… unable to do the system restore. No previous restore points created…

    Now you have another problem with Windows 7 Home Premium. I am not able to do the system restore.  It gives error 0 x 81000203 when I press the system protection option in the properties of my computer window. Any body solve this problem. I checked the services like cliché, CPP are working properly. Because of this error, I am unable to anytime upgrade to Ultimate edition. Help, please!

    Here’s the Instant link that displays the error.

    [IMG] http://i43.tinypic.com/zioqdg.png [line]

    Hard

    Check your hard drive for errors:
    Click Start
    Type: CMD, according to the results, right-click CMD
    Click on «Run as Administrator»
    At the command prompt, type: chkdsk /f /r
    When you restart your system, your computer will be scanned for errors and will try to correct them. Andre Da Costa http://adacosta.spaces.live.com http://www.activewin.com

  • Unable to load the query in Crystal Designer: error «Could not load the Query builder compenent.»

    Hi all
    I am using Crystal report 10 which was an upgrade of crystal 7 and 8.5
    I can open the crystal report and can do everything but I could not display the SQL query option
    It gives me an error message
    «Failed to load the Query builder compenent.»
    I also reinstalled the application twice as a sysadmin even then I get this message
    Please, can someone suggest me what should I do?

    Contact technical support for Crystal Reports or watch in their forums. This is not a product of MS and is not related to the installation, upgrade and activation of Windows XP.

  • How to execute the query automatically when a query is added, Panel

    Hello

    Jdev: 12.1.3

    I added a queryPanel (af:query) on my Page. Everything works fine when I do a search.

    I wish I had the original Version to run the query that is executed automatically when loading the page. How can this be achieved?

    What I have to do this explicitly, or is it a property that I can use?

    See you soon

    AJ

    You can generate the default display criteria again, setting the mode to automatic query.

    You generate default criteria by adding each attribute to a criterion without specifying and literal bind variable.

    Timo

  • Unable to produce the query results

    Hi all

    Hello. I’m aunable write a query that can produce reuls froe below question. An account can have several part relationship.

    Here is the data for the x table

    PartyID — AcctNo — indicator — RoleCode

    1111      ——     123   ——     Y         ——-  110

    1112    ——-     123   ——    N        ——— 120

    1113     ——     123   ——   N          ———   130

    1114     ——-   124     ——   N        ———    100

    1115    ———   124    ——- N         ———   110

    1116   ———   124      —-   N       ———    100

    1115      ———  125             Y       ——-        100

    1116      ——-    125             N      ——         110

    1117      ——-   126            Y         ——        100

    Query should return these AcctNo is not any indicator = ‘Y’ and RoleCode did not have 100. In this case the results should be

    AcctNo

    123

    124

    Thanks in advance

    Don

    Hello

    885137 wrote:

    Hi, Frank, here is creation and insertion of table scripts. …

    Thank you.

    So what’s the problem with the query I posted in response #1?  (You must use the correct name of the table, of course).  Specify where he makes incorrect results and explain why these results are false.

  • Unable to solve the query

    Hello

    I have the following table.

    Complex No. Amount complex The child Bill Amount of the invoice Date of invoice
    123 9000 245 2000 October 1, 13
    123 456 3000 November 1, 13
    123 567 4000 31 October 13

    My requirement is to generate the next report

    Complex No. Amount complex Until the Date Later date
    123 9000 6000 3000

    Where Till Date is the sum of the amount of the invoice dated of the < = 31 October 13 and dated in the future is the sum of the amount of the invoice dated dated > 31 — OCT-13.

    Can someone help me with the query?

    with t as)

    Select 123 complex_no 9000 complex_amount, child 245, invoice_amount 2000, date ‘ 2013-10-01’ invoice_date of all the double union

    Choose 123, null, 456, 3000, date » 2013-11-01 all the double union

    Choose 123, null, 567, 4000, date » 2013-10-31 of the double

    )

    Select complex_no,

    Sum (complex_amount) complex_amount,

    Sum (case when invoice_date<= last_day(sysdate)=»» then=»» invoice_amount=»» end)=»»>

    sum (case when invoice_date > last_day (sysdate) then invoice_amount end) future_date

    t

    Complex_no group

    /

    COMPLEX_NO COMPLEX_AMOUNT TILL_DATE FUTURE_DATE
    ———- ————— ———- ————
    123 9000 6000 3000

    [email protected] >

    SY.

  • Fill a text element to EXECUTE the QUERY

    Fill a text element when a list item is changed by using the following code in a trigger WHEN-LIST-CHANGED:

    SELECT ROOM_DESC IN: SESSIONS. ROOM_DESC OF ROOMS WHERE ROOM_REF =: SESSIONS. ROOM_REF;

    It works fine but when I start a new form and click on run query that do not appear in the text element data.

    What type of trigger can I use these data through when I press to run the query and if I can use the same code?

    Bravo guys

    Hello

    This because when you pull, the trigger WHEN LIST-CHANGED does not occur. So, write the same line in the trigger after REQUEST of the block.

    Kind regards

    Manu.

    If my answer or the answer to another person has been useful or appropriate, please mark accordingly

  • the system passed variable is unable to execute the nested query

    {color: #0000ff} list = text_table.txt

    Cat $liste | all read LINE {color}

    do

    sqlplus-silent szubair/ssz12345 & lt; & lt; EOF & gt; / dev/null 2 & gt; & 1

    set LINE = $LINE

    set pagesize 0 feedback off check out of position off echo off;

    Set serveroutput size 2000;

    ARRAYSIZE Set 3;

    fixed lines 2000;

    Set colsep @ | @ ;

    game of garnish trims

    coil /tmp/SQL.txt;

    Select ‘trim(‘|| column_name ||’),’ all_tab_columns where table_name = ‘& LINE «;

    spool off;

    coil $LINE;

    {color:#ff0000}@sql1.sql & lt;-this request does not accept the $LINE..} Please see in the blue text)

    spool {color}

    output

    EXPRESSIONS OF FOLKLORE

    fact

    ========= SQL1.sql —————————————————

    Select / * + parallel ALL_ROWS (16) * / trim (IHOSRSUC), trim (PMM_DATETIME), trim (SWITCH_NAME), trim (BSC).

    Trim (indicated), Trim (Sector), Trim (IHO2GATT), Trim (IHO2GSUC), Trim (IHO2GFAL), Trim (IHO2GBLK), Trim (IHO2GREL),

    Trim (IHO2GINT), Trim (IHO3VATT), Trim (IHO3VSUC), Trim (IHO3VFAL), Trim (IHO3VBLK), Trim (IHO3VREL), Trim (IHO3VINT),

    Trim (IHO3DATT), Trim (IHO3DSUC), Trim (IHO3DFAL), Trim (IHO3DBLK), Trim (IHO3DREL), Trim (IHO3DINT), Trim (IHOSPR02),

    Trim (IHOSPR01), Trim (HDROP_INTERC_2V), Trim (HDROP_INTERC_3V), Trim (REC_RELIABILITY_IND), Trim (PART_MAP),

    Trim (PMM_DATESTAMP), Trim (IHOSOCHG)

    a {color: #ff0000} $LINE {color}

    where to_char(PMM_DATESTAMP,’YYYY-MM-DD’)=to_char(sysdate-1,’YYYY-MM-DD’) and rec_reliability_ind = 1;

    {color: #ff0000} ERROR MESSAGE

    of pmmcounter_db. $LINE

    *

    ERROR on line 7:

    ORA-00911: invalid character

    {color}

    any thoughts?

    {color}

    Published by: shakil_zubair on October 28, 2008 12:38 AM

    >

    I guess that SQL * more is Inline script after the shell has replaced all occurrences of variables, therefore, you might want to try an (untested) approach like this:

    list=text_table.txt
    cat $list | while read LINE
    do
    sqlplus -silent szubair/ssz12345 < /dev/null 2>&1
    define LINE=$LINE
    set pagesize 0 feedback off verify off heading off echo off
    set serveroutput on size 2000
    set arraysize 3
    set lines 2000
    set colsep @|@
    set trim on trims on
    spool sql.txt
    
    select 'trim('||column_name||'),' from all_tab_columns where table_name='&LINE';
    
    spool off
    
    spool temp.txt
    select '$LINE' from dual;
    # if you need to have the object name qualified you need to add it like that
    # select 'owner.$LINE' from dual;
    spool off
    
    spool $LINE
    
    @sql1.sql
    
    spool off
    exit
    EOF
    done
    
    -- SQL1.SQL:
    
    select /*+ ALL_ROWS parallel(16)*/
    @@sql.txt
    from
    @@temp.txt
    where to_char(PMM_DATESTAMP,'YYYY-MM-DD')=to_char(sysdate-1,'YYYY-MM-DD')
    and rec_reliability_ind=1;
    

    Moreover, it is a good idea to post your password here in the forum.

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

    Published by: Randolf Geist on October 28, 2008 14:10

    security warning

  • How to solve the error windows 8007641? Unable to install the update or access iTunes store.

    I keep trying to install the latest windows update and there no 2 x, so I hit the system restore to a point earlier, now it failed for the 3rd time and I get the error code 8007641. can you help me solve this problem? It all started when I couldn’t access the iTunes store. Thank you

    Hello

    Update can’t install?

    Method 1:

    Problems with installing updates

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-installing-updates

    Method 2:

    I suggest to perform the clean boot and try to install the update manually and check.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Note: After a repair, be sure to set the computer to start as usual as mentioned in step 7 in the above article.

    http://www.Microsoft.com/download/en/default.aspx

    Method 3:

    I also suggest you to follow the links and contact support apple technique.

    http://support.Apple.com/kb/ts3297

    http://support.Apple.com/kb/ts1368

    http://www.Apple.com/support/

  • I get error messages ie3sh.exe — Unable to locate the BHO component. DLL not found message when I start my computer. I do not have the reinstall disk that I need to do.

    I also 80070490 error codes and C355. I used CCcleaner to clean my registrys and used the system preparation tool. I regularly use spybot search and destroy for malware protection and search for viruses with my anti-virus program. What should I do? Thank you.

    BHO. DLL & IE3SH problems on my computer starts?
    http://answers.Microsoft.com/thread/ffbe5016-84d9-47E0-8303-43419c1abba5

  • InDesign CC | Error with file indd — «unable to open the file…». Adobe InDesign does not support the file format.

    I encountered a very strange error with InDesign CC after you save a file created in CS4. I would like to attach the file but I don’t know how to do this, if I can. The file is 44 KB and doesn’t seem like it should be (file I saved was a great book cover). Now, as the original CS4 file has been replaced using InDesign CC, the file is corrupted and I get the error message shown below. The file is not open in another application. If somebody has got this before?

    11-5-2014 2-13-14 PM.jpg

    Replace the .idml extension and see if it opens…

  • Понравилась статья? Поделить с друзьями:
  • Frigate выдает ошибку
  • Friday the 13th the game ошибка подключения
  • Friamat prime eco ошибка 34
  • Frenic mega ошибки
  • Frenic lift ошибка oc3