For Update Query from ORACLE Forms
Hi
We are using Oracle Forms 10g running with 10g database 10.2.0.1.0. We happend to see a query which is getting generated in AWR report like Select rowid, all_columns from TableName for Update of C1 Nowait. But no such query is really written in forms and we are aware that, Any query prefixed with rowid is definitely executing from Forms. But how the ForUpdate and Nowait clause is appended to the query.
We have checked the following properties in the database Block
*1) Locking Mode is set to Automatic*
*2) Update Changed Columns only is set to YES*
*3) Query all records is set to No (Though this particular property may not be relevant to the issue)*
What is the property or setting which might trigger such a query from ORACLE Forms with ForUpdate and Nowait clause.
Any ideas/suggestions on why such behaviour. Please have a healthy discussion on this. Thanks in advance.
you can't dynamically add a query to the data model in reports.
You should look into the XML based customization of Oracle Reports. This will enable you to define a report dynamically by creating a definition in XML.
Also another option is to have the report with a query in it and use lexical parameters in reports to pass the query definition or just the where part of it.
Look at the reports online help for both of these solutions.
Similar Messages
-
Passing a value for date parameter from Oracle Forms to BIP
Hi
I have created a report with the following SQL query:
select
d_tables.d_seq,
to_date(d_tables.d_created) creation_date,
d_tables.d_created_by created_by,
d_tables.d_pk,
d_tables.table_name,
d_tables.comments
from
d_tables, d_applications
where
d_tables.d_ppk = d_applications.d_pk
and to_date(d_tables.d_created) >= nvl(:P_CRE_DATE_FROM, to_date(d_tables.d_created))
and to_date(d_tables.d_created) <= nvl(:P_CRE_DATE_TO, to_date(d_tables.d_created))
The parameters P_CRE_DATE_FROM and P_CRE_DATE_TO have been set up as date in BI Publisher with format dd-MMM-yyyy
The report works fine when launched in BI Publisher.
I want to call this report from Oracle Forms and I'm trying to pass the values for both the parameters. However, the report does not generate output based on values passed.
Does it have to do with datatype? Does anyone know a solution for this?
Kind regards,
AparnaThanks for your suggestion. I am already referring to the whitepaper and have integrated Forms with BI Publisher. The parameter passing is working fine for a varchar2 type of parameter. However, for a date type, there seems to be some problem.
-
For Update Query with Wait Clause from ORACLE Forms
Hi
We are using Oracle Forms 10g running with 10g database 10.2.0.1.0. We happend to see a query which is getting generated in AWR report like Select rowid, all_columns from TableName for Update of C1 Nowait. But no such query is really written in forms and we are aware that, Any query prefixed with rowid is definitely executing from Forms. But how the ForUpdate and Nowait clause is appended to the query.
We have checked the following properties in the database Block
*1) Locking Mode is set to Automatic*
*2) Update Changed Columns only is set to YES*
*3) Query all records is set to No (Though this particular property may not be relevant to the issue)*
What is the property or setting which might trigger such a query from ORACLE Forms with ForUpdate and Nowait clause.
Any ideas/suggestions on why such behaviour. Please have a healthy discussion on this. Thanks in advance.Why have you started another thread on the same thing?
FOR UPDATE cursor is causing Blocking/ Dead Locking issues
Just use one thread to avoid confusion.
The fact that nobody has answered on the other thread for a couple of days could be to do with it being the weekend and most people are not at work.
Either be patient or, if it's more "urgent" than that, raise a SR/Tar with Oracle metalink. -
Insert / Update from Oracle Forms -- URGENT Please thanks
Hello All,
I need to create form which can be use for two purposes. i.e insert and update
I have one table called emp which has 50 columns.
Only four columns has not null constraint.
I need to insert values in only these columns.
From SQLPLUS it can be cone as below:
insert ito emp values ('333','2222','007','AA','01-JAN-2007','','','','','','','','','',........);
After that I need to update one of the coulmn with the value as
update emp
set zipcode = 'Y'
where empt# = 007;
How could I achive this from Oracle form.
Any help will be appricated.
DWhy handle updates in the On-Update trigger? Oracle Forms already handles this for you. You update a data value in a field and click on the SAVE button (assuming you have a Save button) and the Oracle Forms handles the Update. The On-Update trigger is provided so you can perform processing in addition to the default UPDATE.
Craig... -
Outer join query for SQL server from Oracle
Hi All,
My question is regarding making queries from Oracle to SQL Server database thorugh DBLink.
In my oracle database I have a DBLink emp.world for SQL Server database.
I need to query SQL Server data from oracle (so that this query can be combined with other oracle tables).
Query is given below:
SELECT
a."EmpID" as "Employee ID",
a."EmpStatus" "Employee Status"
b."EmpSub" as "Employee Subjects"
FROM
[email protected] a
left outer join [email protected] b on a."EmpID" = b."suEmpID"
ORDER BY a."EmpID";My problem is when I run the same query from oracle, it does not show the EmpID that does not exist in Subjects table, but when run from actual SQL Server database, it shows all the records.
Samples are given below:
Run from Oracle
Employee ID Employee Status Employee Subjects
101 Active Maths
102 Active Maths
102 Active Physics
104 Inactive Chemistry
Run form SQL Server
Employee ID Employee Status Employee Subjects
101 Active Maths
102 Active Maths
102 Active Physics
103 Active NULL
104 Inactive ChemistryI am not sure why in oracle outer join for SQL server tables is not working. What is the right way for outer join in this case.
I am using oracle database 10gR2 and SQL Server 2005.
Please Help.
Thanks.SELECT
a."EmpID" as "Employee ID",
a."EmpStatus" "Employee Status"
b."EmpSub" as "Employee Subjects"
FROM
[email protected] a
left outer join [email protected] b on a."EmpID" = b."suEmpID"
ORDER BY a."EmpID";
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm#sthref3175
From your description, it appears you may need a right outer join. You want to get back all the rows from 'B', not from 'A'. Try a right join and let us know. -
Hi All,
I having block level 8000 records, I Scroll down from First record to last record it is takeing more time.
I Observed tkproof while scrolling two select statments are running..
1) pre-query block level
2) For update query
For update query -> How is is forming? Any Property or some else?
I am not able to find the second query..where it is forming..How to restrict the second query.
Query Array size - 10
Number of records buffered - 10
Number of records Displayed - 10
Query all records - No
Locking mode - Immediate
Key mode - Automatic
Version - Oracle 10g
Plz ........anyThe for update -query is generaetd by forms when its locking the record. If you didn't change anything in the record "by hand", check if there is some code in the POST-QUERY-trigger which forces the record to be locked. if its the POST-QUERY you can issue the following command to avoid the lock at the end of the POST-QUERY:
SET_RECORD_PROPERTY(:SYSTEM.TRIGGER_BLOCK, :SYSTEM.TRIGGER_RECORD, STATUS, QUERY_STATUS); -
Difference in select for update of - in Oracle Database 10g and 11g
Hi, I found out that Oracle Database 10g and 11g treat the following PL/SQL block differently (I am using scott schema for convenience):
DECLARE
v_ename bonus.ename%TYPE;
BEGIN
SELECT b.ename
INTO v_ename
FROM bonus b
JOIN emp e ON b.ename = e.ename
JOIN dept d ON d.deptno = e.deptno
WHERE b.ename = 'Scott'
FOR UPDATE OF b.ename;
END;
/While in 10g (10.2) this code ends successfully (well NO_DATA_FOUND exception is raised but that is expected), in 11g (11.2) it raises exception "column ambiguously defined". And that is definitely not expected. It seems like it does not take into account table alias because I found out that when I change the column in FOR UPDATE OF e.empno (also does not work) to e.mgr (which is unique) it starts working. So is this some error in 11g? Any thoughts?
Edited by: Libor Nenadál on 29.4.2010 21:46
It seems that my question was answered here - http://stackoverflow.com/questions/2736426/difference-in-select-for-update-of-in-oracle-database-10g-and-11gThe behaviour seems like it really is a bug and can be avoided using non-ANSI syntax. (It makes me wonder why Oracle maintains two query languages while dumb me thinks that this is just a preprocessor matter and query engine could be the same).
-
Frm-40505:ORACLE error: unable to perform query in oracle forms 10g
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,
PriyaHi 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 -
Writing an update statement in oracle forms 9i
Hi ,
I have a problem situation in which
I am fetching values from a cursor and a recod group into two data block items text box and combo box respectively .
Both the data is fetched from different tables .
Now based on the selection from combo box I have to update the selected value in another table by writing an update statemet .
I have created a button and on the trigger event of when button pressed I wrote a simple update statement but it's not working that way .
Kindly help me how to write manual update statements in oracle forms 9i
I can't used the update buil in of forms as I want to update in a table which is not mentioned in the property pallete of data block
please helpI just wrote a procedure
PROCEDURE update_current IS
BEGIN
update table abc set xculumn= :block_name.item_name2 where ycolumn = :block_name.item_name1 ;
commit;
and I called the procedure from a when button pressed trigger
it gave an error invalid identifier abc ( which is table name)
pls help
I am trying to do it with form_ddl(update_query)
but here I am facing another problem
I have update_query = 'update table abc set xculumn= ' || :block_name.item_name2 || 'where ycolumn = '||:block_name.item_name1
now since xculumn and y column are varchar type so I suppose while preparing the query I have to concatenate single quotes ( ' ) at the start and end
but i am facing problems in doing so
please tell me an alternative way or how to concatenate single quotes in the above update_query variable -
Call Oreacle report from Oracle form
Hi,
I need call a Oracle report from Oracle Form and found the the following procedure from this forum. I have 2 parameters 'start_date' and 'end_date' passing to called report. The following example just have onle parameter
'departmentno' passing. Is that mean I need to call add_parameter twice like the following?
add_parameter(plid, ''start_date' , TEXT_PARAMETER,:control.start_date);
add_parameter(plid, ''end_date' , TEXT_PARAMETER,:control.end_date);
In the following example:
add_parameter(plid, 'departmentno', TEXT_PARAMETER,to_char(:dept.deptno));
Thanks for clarification!!
Michael
PROCEDURE pass_parameter
IS
plid paramlist;
the_param varchar2(15) := 'tmpdata';
BEGIN
plid := get_parameter_list(the_param);
/* check if 'tmpdata' exists */
IF NOT id_null(plid) THEN
destroy_parameter_list(plid);
END IF;
/* if it does destroy it */
plid := create_parameter_list(the_param);
/* create it afresh */
add_parameter(plid, 'departmentno', TEXT_PARAMETER,to_char(:dept.deptno));
/* associate the param in the form with the param in the report */
add_Parameter(plid, 'PARAMFORM', TEXT_PARAMETER, 'NO');
/* to suppress the parameter form displaying */
run_product(REPORTS, /* product name */
'formrep.rdf', /* Oracle Reports module */
SYNCHRONOUS, /* communication mode */
RUNTIME, /* execution mode */
FILESYSTEM, /* location of the Reports module */
plid, /* handle to the parameter list */
null
END;this my code on when_button_press
declare
rec_grp recordgroup;
col1 groupcolumn;
col2 groupcolumn;
col3 groupcolumn;
col4 groupcolumn;
col5 groupcolumn;
col6 groupcolumn;
col7 groupcolumn;
col8 groupcolumn;
pl_id paramlist;
i number :=1;
begin
rec_grp := find_group('emp_rec');
if not id_null(rec_grp) then
delete_group(rec_grp);
end if;
rec_grp := create_group('emp_rec');
col1 := add_group_column('emp_rec','Empno',CHAR_COLUMN,8);
col2 := add_group_column('emp_rec','Ename',CHAR_COLUMN,30);
col3 := add_group_column('emp_rec','job',CHAR_COLUMN,15);
col4 := add_group_column('emp_rec','Mgr',CHAR_COLUMN,8);
col5 := add_group_column('emp_rec','Hiredate',DATE_COLUMN,10);
col6 := add_group_column('emp_rec','Sal',CHAR_COLUMN,10);
col7 := add_group_column('emp_rec','comm',CHAR_COLUMN,10);
col8 := add_group_column('emp_rec','Deptno',CHAR_COLUMN,4);
loop
go_block('emp_r');
go_record(i);
add_group_row(rec_grp,i);
set_group_char_cell('emp_rec.empno',i,:emp_r.empno);
set_group_char_cell('emp_rec.ename',i,:emp_r.ename);
set_group_char_cell('emp_rec.job',i,:emp_r.job);
set_group_char_cell('emp_rec.mgr',i,:emp_r.mgr);
set_group_date_cell('emp_rec.Hiredate',i,:emp_r.Hiredate);
set_group_char_cell('emp_rec.sal',i,:emp_r.sal);
set_group_char_cell('emp_rec.comm',i,:emp_r.comm);
set_group_char_cell('emp_rec.deptno',i,:emp_r.deptno);
i := i + 1;
exit when :system.last_record='TRUE';
end loop;
pl_id := get_parameter_list('para1');
if not id_null(pl_id) then
destroy_parameter_list(pl_id);
end if;
pl_id := create_parameter_list('para1');
add_parameter(pl_id,'Q_EMP',DATA_PARAMETER,'emp_rec');
add_parameter(pl_id,'paramform',text_parameter,'no');
run_product(REPORTS,'D:\ora\daily.RDF',synchronous,runtime,filesystem,pl_id,NULL);
end;
---------and this is my reprot query----------
select Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno
from emp
where empno=:emp_rec
order by empno;
but it show error at run time
Rep-1340
plzz solve this problem to me
fahad -
Update query against InfoPath form data
Hi,
We are using SharePoint Enterprise 2010, and have set up a series of InfoPath forms to manage various aspects of the projects we run (request forms, change control, toll gating, status reports, etc). The forms are all created in InfoPath and save the
data to form libraries on SharePoint.
We are in the process of revamping the status report. The fields for Accomplishments, Planned Activities, Risks and Dependencies were origianally set up as plain text. We are moving to a bullted field for each. My concern is that once we
add the new fields to the published form, the old ones will disappear fom view. So if we pull up an older status report, the information wont be available to view.
Is there any way to write an update query against this form data? Supposed I add a new bulleted field for "Accomplishments_NEW" and change the existing field to "Accomplishments_OLD". If I were working with in Access, it would
be a simple update query where the field selected would be "Accomplishments_NEW" and the update value would be "Accomplishments_OLD". I have actually tried this through Access but we only seem to be able to read this data through
Access, not write to it.
Is there any way to make such a change on the SharePoint side?
DennisYes.
The approach is to add two fields:
- Accomplishments_v2 and Accomplishments_v1_Loaded (true/false)
when the form loads, if _v1_Loaded is false, migrate the data from the old field into _v2, and then set _v1_loaded = true
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs -
Calling web service from oracle forms 10g
Problem Description:
I'm following the steps as per the doc:
http://www.oracle.com/technology/products/forms/htdocs/10gr2/howto/webservicefromforms/ws_10_1_3_from_forms.html
to create a java stub to call external web service and then use java importer in oracle forms to call this web service from oracle forms.
WSDL for external web service used is http://gend:83/DesignService.svc?wsdl
The service was developed by us.
Calling the web service using JDeveloper works fine but when I complie in Oracle Forms it returns wrong number of types of arguments in call SENDHELLO.
The code from oracle form to call web service is as below:
DECLARE
jo ora_java.jobject;
xo ora_java.jobject;
rv varchar2(2000);
ex ora_java.jobject;
str varchar2(100);
BEGIN
jo := GendServiceClient.new;
rv := GendServiceClient.sendHello('Nora');
EXCEPTION
WHEN ORA_JAVA.JAVA_ERROR then
message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
WHEN ORA_JAVA.EXCEPTION_THROWN then
ex := ORA_JAVA.LAST_EXCEPTION;
message(Exception_.toString(ex));
END;
Any help/ideas on this is greatly appreciated. Thanks.
Edited by: KE Nora Loera on Jun 1, 2012 1:24 PMMy primary skill is PL/SQL but the only information I found on Oracle's site to call a web service from a 10g Form was creating a jar file and importing the java class. Since I don't want to ask our corporate IT to make changes on the UNIX box for the jar files I went a different route.
I use UTL_HTTP.BEGIN_REQUEST to call a URL then load I load the data to a table as a CLOB since we have more than 4000 characters. Now I need to parse the XML and load it into a form. I have never done this so if there is a helpful site please let me know. I have looked at several sites but none do what I want.
Thanks -
Calling web service from oracle forms fails with ORA_JAVA.JAVA_ERROR
Problem Description:
I'm following the steps as per the doc:
http://www.oracle.com/technology/products/forms/htdocs/10gr2/howto/webservicefromforms/ws_10_1_3_from_forms.html
to create a java stub to call external web service and then use java importer in oracle forms to call this web service from oracle forms.
WSDL for external web service used is http://www.webservicex.net/CurrencyConverter.asmx?wsdl
Calling the web service using JDeveloper works fine but from Oracle Forms returns ORA_JAVA.JAVA_ERROR; Unable to call out to Java, Invalid object type for argument 1
The code from oracle form to call web service is as below:
DECLARE
jo ora_java.jobject;
rv ora_java.jobject;
ex ora_java.jobject;
outString varchar2(2000);
BEGIN
jo:= CurrencyConvertorStub.new;
--This will get the exchange rate from US Dollars to UK Sterling.
rv:= CurrencyConvertorStub.ConversionRate(jo,'CAD','USD');
message (float_.floatValue(RV));
EXCEPTION
WHEN ORA_JAVA.JAVA_ERROR then
message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
WHEN ORA_JAVA.EXCEPTION_THROWN then
ex := ORA_JAVA.LAST_EXCEPTION;
outString := Exception_.toString(ex);
message(outString);
END;
Any help/ideas on this is greatly appreciated. Thanks.Yes, it is the message line - so basically this call fails => rv:= CurrencyConvertorStub.ConversionRate(jo,'CAD','USD'); and control goes in the exception block
WHEN ORA_JAVA.JAVA_ERROR then
message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
Below is the code from java stub that was generated using JDeveloper by using web services stub/skeleton and associating the WSDL
public Double ConversionRate(String FromCurrency, String ToCurrency) throws Exception
URL endpointURL = new URL(endpoint);
Envelope requestEnv = new Envelope();
Body requestBody = new Body();
Vector requestBodyEntries = new Vector();
String wrappingName = "ConversionRate";
String targetNamespace = "http://www.webserviceX.NET/";
Vector requestData = new Vector();
requestData.add(new Object[] {"FromCurrency", FromCurrency});
requestData.add(new Object[] {"ToCurrency", ToCurrency});
requestBodyEntries.addElement(toElement(wrappingName, targetNamespace, requestData));
requestBody.setBodyEntries(requestBodyEntries);
requestEnv.setBody(requestBody);
Message msg = new Message();
msg.setSOAPTransport(m_httpConnection);
msg.send(endpointURL, "http://www.webserviceX.NET/ConversionRate", requestEnv);
Envelope responseEnv = msg.receiveEnvelope();
Body responseBody = responseEnv.getBody();
Vector responseData = responseBody.getBodyEntries();
return (Double)fromElement((Element)responseData.elementAt(0), java.lang.Double.class);
} -
How to print BIP reports from Oracle Forms?
Hi all,
I have a question in regards to printing BIP reports from Oracle Forms... We are aiming for a server installation of BIP with integration to Oracle Forms using SSO to handle security. We use Forms built-in web.show_document to render and view the report in PDF/Excel etc... We would like to by pass the viewing and print some of these reports directly to the printer.
Any idea/suggestions how we can go about this?
Thanks in advance for your time.
YahyaYahya,
via HTTP it's not possible to send a report directly to the printer. You had to go via the Scheduler, which is able to do that. With the WebService API you can call a report with the Scheduler and Execute Immediate.
Regards
Rainer -
URGENT!!! calling crystal reports from oracle forms 10g
Is it possible to call crystal reports from oracle forms 10g?
Can someone help to answer how, if there is a solusion, to call crystal reports from oracle forms 10g.
Please provide codes with details showing step by step.
Thankshi
try something like this.
DECLARE
charWinHandle VARCHAR2(50);
numWinHandle NUMBER;
BEGIN Set_Application_Property(Cursor_Style,'BUSY');
charWinHandle := Get_Item_Property('Control.Rep',Window_Handle);
numWinHandle := To_Number(charWinHandle);
:Item('Control.CrystalReport1').OCX.Crystal.Crysta lReport.WindowParentHandle
:= numWinHandle;
:Item('Control.CrystalReport1').OCX.Crystal.Crysta lReport.WindowState := 2;
:Item('CONTROL.CRYSTALREPORT1').OCX.Crystal.Crysta lReport.Connect
:= 'DSN=;UID=' || Get_Application_Property(UserName) ||
';pwd=' || Get_Application_Property(password) || ';dsq=;';
Crystal_CrystalCtrl.ReportFileName( :Item('Control.CrystalReport1').interface,
'C:\Sample_Rep.Rpt' );
Set_Window_Property( Forms_Mdi_Window, Window_State,Maximize );
Set_Window_Property( 'MAIN', Window_State, Maximize );
:reptitle := 'Report Preview Window';
numWinHandle := Crystal_CrystalCtrl.PrintReport( :Item('Control.CrystalReport1').interface );
Set_Application_Property(Cursor_Style,'DEFAULT');
END;NOTE: Change the report name and path according to your required file name and path in
the "Crystal_CrystalCtrl.ReportFileName" method call. Also, the connection string shown
assumes that you will use the current USER and PASSWORD for the Form.
- To make the above Form generic so that you can run any Crystal report from it, then create
a parameter for the report name and pass it to the Form using CALL_FORM from any other Form.
Then just replace the file name with the passed parameter.
-. Run the Form
If its correct/helpful please mark it thanks.
sarah
Edited by: S@R@h on Nov 27, 2009 6:33 AM
Maybe you are looking for
-
Unable to view music videos in iTunes on mac
I have iTunes on a G5 Mac Pro It is on the latest version of 10.5 with the most recent update to iTunes. I am unable to view music videos many of which I purchased from the iTMS or came with music CD's as extras some are m4v others are mp4. If on imp
-
Every time I use the numbers on my keyboard (on the right) it doesn't work and it also freezes the mouse so i have to disconnect the mouse and restart.I have looked in settings and a few other things,I must of accidentally hit a key to initiate this,
-
IView used in middle part of SDN homepage?
Hi, I am actually a Basis Consultant, but have to build a basic prototype of a portal for demonstration purposes so this is propably a very basic developemnt question: What iView is being used in the middle part of the SDN homepage to display the new
-
Mass release of Physical Samples
Hi Gurus, Is there any T code for Mass release of Physical samples. We are in cutover and for around 1000 Open inspection lots, we need to release the physical Samples. It will be labourious to release every sample using QPR4. Tried LSMW,
-
Font size based on screen size
How to set different fonts for a textblock or for other controls in a page based on the screen resolution