Abnormal termination of runform when PROCEDURE is used as Query Data Source Type
I created a package with a procedure that returns a table of records. This
procedure tested OK in SQLPLUS. I then created a form and in this form a block
that used this procedure as the Query Data Source Name, and of course the Query
Data Source Type has been set to PROCEDURE. This form runs beautifully when the
number of records returned is small (a few hundreds). But when the number of
records is large (I have one case where the total number of records returned
was 11099) then it will crash. I also found that whenever this happens, there
will be a file in my C:\TEMP with funny namessuch as s90, s81, etc. They are
always the same size (5008 kBytes).
Anyone any ideas?
null
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Chandra movva([email protected]):
Create a view and base your block on view.That could solve the problem unless you have other requirements specifically.<HR></BLOCKQUOTE>
Chandra,
Thank you for your suggestion. Unfortunatel, we have requirements that translate to logics too complicated to be handled by views, and that is why we use PROCEDURES. This actually works very well and very fast, except when we have lots of records returned, then it fails. I am just wondering whether this is a configuration problem ???
Regards,
A. Leung
null
Similar Messages
-
Using query data source type as procedure
Could anyone pls. let me know how to use the query data source type property as procedure? Is there any example or document where I can find the above info? Any help or reference to doc will be helpful...
Thanks in advanceHave a look at Note 66887.1 on MetaLink.
-
Query for records on a block with Query Data Source Type : Procedure
Hi All,
The veriosn of form I'm using is:
Forms [32 Bit] Version 6.0.8.23.2
I have a block based on a procedure.
But when I enetr-query and search for records specific to ceratin criteria even then the result of the Query is all records.
Is Query not allowed on a block with Query Data Source Type : Procedure.
Hope my question is clear.
Thanks in advance.
Regards
ArifWhen you use a table based block, forms can construct any select with any where clause based on the given inputs. Using a procedure based block, forms cannot "know" which in or out parameter of the procedure corresponds to which item. Even if Forms could pass the value of an item to an argument automagically, the procedure would have to "do something" with the argument, and you´d have to code it.
So, any item that should be used in the where-clause must be mapped to an argument.
Perhaps it would be easier to use a table based block querying a view? For DDL, you could use an instead-of-trigger on the view.
Regards,
Gerd -
Query data source type = procedure or from clause
1)I have a form where a block is based on a from clause. In the source name I entered a simple sql statement.
Isn't the items suppose to show without any other action or
WHAT ELSE DO I NEED TO DO IN ORDER TO SEE THE BLOCK ITEMS EQUIVALENT TO THE COLUMNS IN THE QUERY?
2) I have a form where a block is based on a procedure.
First I created a package in a program unit with the procedures query_procedure, insert_procedure, update_procedure, delete_procedure and lock_procedure.
Then I set the query data source name to the package query_procedure. The columns and arguments were automatically filled by Forms - they are fine as well.
Forms automatically created the block triggers insert-procedure,delete-procedure, update-procedure and lock-procedure.
Everything seems to be fine but when I run the form and execute the query I get frm 40505 - unable to perform query.
What am i doing wrong?
This is the package:
PACKAGE pkgdeptemp IS
type dept_emp is record (
empno number(4),
ename varchar2(10),
job varchar2(9),
hiredate date,
sal number(7,2),
deptno number(2),
dname varchar2(14));
success constant number :=0;
type dept_emp_ref is ref cursor return dept_emp;
type dept_emp_tab is table of dept_emp index by binary_integer;
procedure query_procedure (resultset in out dept_emp_ref, p_empno in number);
procedure lock_procedure (dmlset in out dept_emp_tab);
procedure insert_procedure (dmlset in out dept_emp_tab);
procedure update_procedure (dmlset in out dept_emp_tab);
procedure delete_procedure (dmlset in out dept_emp_tab);
END;
PACKAGE BODY pkgdeptemp IS
function get_success return number is
begin
return(success);
end;
procedure query_procedure (resultset in out dept_emp_ref, p_empno in number) is
begin
open resultset for
select e.empno, e.ename, e.job, e.hiredate, e.sal, e.deptno, d.dname
from emp e, dept d
where e.deptno = d.deptno
and e.empno = nvl(p_empno, e.empno);
end query_procedure;
procedure lock_procedure(dmlset in out dept_emp_tab) is
tempout number(4);
begin
for i in 1..dmlset.count loop
select empno
into tempout
from emp
where empno = dmlset(i).empno
for update;
end loop;
end lock_procedure;
procedure insert_procedure (dmlset in out dept_emp_tab) is
cursor c_dept (i binary_integer) is
select deptno
from dept
where deptno = dmlset(i).deptno;
tempout number(4);
begin
for i in 1..dmlset.count loop
open c_dept(i);
fetch c_dept into tempout;
if c_dept%notfound then
insert into dept(deptno,dname)
values(dmlset(i).deptno, dmlset(i).dname);
end if;
close c_dept;
insert into emp (empno,ename,job,hiredate,sal,deptno)
values (dmlset(i).empno, dmlset(i).ename, dmlset(i).job, dmlset(i).hiredate, dmlset(i).sal, dmlset(i).deptno);
end loop;
end insert_procedure;
procedure update_procedure (dmlset in out dept_emp_tab) is
cursor c_dept (i binary_integer) is
select deptno
from dept
where deptno = dmlset(i).deptno;
tempout number(4);
begin
for i in 1..dmlset.count loop
open c_dept(i);
fetch c_dept into tempout;
if c_dept%notfound then
insert into dept(deptno,dname)
values(dmlset(i).deptno, dmlset(i).dname);
else
update dept
set deptno=dmlset(i).deptno,
dname=dmlset(i).dname;
end if;
close c_dept;
update emp
set empno=dmlset(i).empno,
ename=dmlset(i).ename,
job=dmlset(i).job,
hiredate=dmlset(i).hiredate,
sal=dmlset(i).sal,
deptno=dmlset(i).deptno;
end loop;
end update_procedure;
procedure delete_procedure (dmlset in out dept_emp_tab) is
begin
for i in 1..dmlset.count loop
delete from emp where empno = dmlset(i).empno;
end loop;
end delete_procedure;
END;for ur q1:
create the text items manually in the layout editor or in the obj navigator then specify there properties manually in the the pallette.
database item = yes
column name = field name in ur select statement
for q2:
try running the form again and press F8 then if an error occur press F1 or shift F1 to show the error in ur code.
i suspect u forgot to specify a value for the in parameter the reason why u get an error that is specify the actual parameter for ur in argument then press F8.
enjoy! -
How to use 'query data source Name ' property in a block
I want to create a block using query and want to show the columns on a form.
Could you please tell me how can I do this?
RegardsHi!
Create a new block manually.
Set the Query Data Source Type Property to FROM clause query.
In the Query Data Source Name Property write your query like you would
write it in sql*plus or toad but without a order by clause.
Set the DML Data Target Type Property to None.
Create items for the columns in your query.
May set the where clause and order by property of the block.
Build the form and execute a query in your new block.
Regards -
Using a SQL data source and XML data source in the same template
I am trying to develop a template for the Request for Quote report generated in Apps 11.5.10. I have loaded the data from the XML output into the template, but I am missing one field - I need the org_id from the po_headers table. Is it possible to use a sql data source (i.e., "select org_id from po_headers_all where po_header_id = [insert header_id from xml data]...") in addition to the xml data source to populate the template at runtime? When you use the Insert > SQL functionality is it static at the time the template is created, or does it call to the database at runtime? I've looked through all the docs I could find, but this isn't clear.
Thanks for any help or suggestions you may have.
RhondaHi Pablo
Thats a tough one ... if you go custom with a data template you will at least get support on the data template functionality ie you have a problem when you try and build one. You will not get support on the query inside the data template as you might have gotten with the Oracle Report, well you could at least log a bug against development for a bad query.
Eventually that Oracle Report will be converted by development anyway, theres an R12 project going on right now to switch the shipped OReports to data templates. AT this point you'll be fully supported again but:
1. You have to have R12 and
2. You'll need to wait for the patch
On reflection, if you are confident enough in the query then Oracle will support you on its implementation within a data template. Going forward you may be able to swap out your DT and out in the Oracle one without too much effort.
Regards, Tim -
Using DAO using a JDBC data source with struts
Hello,
I have created a number of Data Access Objects and Transfer Objects to use in a non EJB, struts web application I am developing. I had tested these with a kind of a Service Locator custom class to provide access to a JDBC connection. My custom class is a bit clunky and not very configurable. I would like to use a data source using the struts config XML file e.g.
<data-sources>
<!-- configuration for commons BasicDataSource -->
<data-source type="org.apache.commons.dbcp.BasicDataSource">
<set-property
property="description"
value="My MySQL Database Connection" />
<set-property
property="driverClassName"
value="com.mysql.jdbc.Driver" />
<set-property
property="url"
value="jdbc:mysql://localhost/databaseName" />
<set-property
property="username"
value="myUsername" />
<set-property
property="password"
value="xxxxxxxxx" />
<set-property
property="maxActive"
value="10" />
<set-property
property="maxWait"
value="5000" />
<set-property
property="defaultAutoCommit"
value="false" />
<set-property
property="defaultReadOnly"
value="false" />
</data-source>
</data-sources>This is great, and precisely the kind of thing I would like to use. However, this datasource is only available AFAIK through a HttpServletRequest instance like in the example I found below...
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception
javax.sql.DataSource dataSource = null;
java.sql.Connection myConnection = null;
try {
dataSource = getDataSource(request);
myConnection = dataSource.getConnection();
// do what you wish with myConnection
} catch (SQLException sqle) {
getServlet().log("Connection.process", sqle);
} finally {
//enclose this in a finally block to make
//sure the connection is closed
try {
if(myConnection != null)
myConnection.close();
} catch (SQLException e) {
getServlet().log("Connection.close", e);
return (mapping.findForward("success"));
}That would be great if I wanted to use the database connection anywhere near a struts Action (wrong tier!). I want access like that to to a data source in my DAOs. Is it possible for me to use the data-sources aproach to access the DB from my DAOs or will I need to use something like JNDI to do this in a similar way but separate from struts. If so I have a big gap in my knowledge as far as JNDI goes which I need to fill and that will be my next question
I'm relatively new to using patterns inn Java and any help or pointers would be great.
Thanks :)Create a JAAS Authentication Entry in the Server configuration.
This should then appear in the drop-down when specifying your DataSource. -
When changing query data source property.....
hello folks,
I have this very weird behavior in oracle forms 10 g R2:
in my form I built a datablock " DB " based on a table " table1 ", in that datablock I added a push button that changed the query data source name of data block DB to " table2 " using the set_block_property() built-in, please note that table1 and table2 has the same structure.
When I query the table2, and if i try to update a record, the updates are not saved and I got the error ora - 0000 , It seems that after changing the query data source to table2, if i try to update a record, the locking is perform to table1 (the original query data source that the datablock is built in the first place) ....
Please can anyone help or explain me this behavior and what can i do to perform a workaround for it,,,,,
and than you in advance...dear Mark,
What indicates that the record is locked? More information please. well if query the v$lock view or from the EM I can see that the lock is performed on the first table -
Able to use % to query data in Some self service pages but in some pages we
Able to use % to query data in Some self service pages but in some pages we get error " Search string cannot start with % "
Able to use % to query data in Some self service pages but in some pages we get error " Search string cannot start with % "This is an intended functionality in 11i/R12 (for performance).
"Please fill in selective criteria in at least one of the following fields for performance reasons" in View Requests Form After ATG RUP7 [ID 1095125.1]
Re: When clicked Specific Requests
Re: query mode 11i
Blind Search
https://forums.oracle.com/forums/search.jspa?threadID=&q=Blind+AND+Search&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Blind Query
https://forums.oracle.com/forums/search.jspa?threadID=&q=Blind+AND+Query&objID=c3&dateRange=thisyear&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
Hi,
i have created a crystal report that uses Excel as data source. Reason i used excel is for easy updating of data by non IT users. The report runs perfectly on my computer, but when i upload it to Infoview, there is error when i run the report from Infoview:
"The database logon information for this report is either incomplete or incorrect."
"Unable to retrieve Object.
The database logon information for this report is either incomplete or incorrect."
May i know what causes the error? There is no user id/password to access the excel file.
I have also tried saving the excel in the same server as the crystal report server, but i still face the same error.
Pls help!
ThanksYou would have created a connection in your local system to access the XLS data
You should be creating a similar connection in the server as well and then update the rpt file with the connection details in CMS
Thanks,
Ganesh -
Bursting using a Concatenated Data Source
Greetings,
I am trying to burst a report using a concatenated data source. I have a bursting SQL query set up that works fine, but I am unsure how to handle the "Split By" option. I have a data model that pulls data from multiple queries, like this:
DETAILS_A
select * from table_a
where payee_id in (:p_payee_id)
DETAILS_B
select * from table_b
where payee_id in (:p_payee_id)
So, if I choose to "Split By" Details_A_Row/Payee_ID, then the data from Details_A is split appropriately, but the reports I generate don't split the information from Details_B properly. I end up with reports where one payee has information for another payee from the Details_B data source. How can I specify that the report should also split/filter the info from Details_B?
To put it another way, what I'd really like to do is go through a list of parameters (payee IDs in this example) and generate a report for each parameter. Is Bursting the most effective way to do this?
From searching the forums, it seems like I might be able to accomplish this using Data Templates as my Data Model instead of SQL Queries. Am I on the right track with that? If so, you guys have any helpful links on how to create Data Templates?
I am using BI Publisher version 10.1.3.4
Any help is appreciated!
MartinFor data template samples, check the following out and then download the zip file (you may not be able to run the reports, but you can view the code)
http://blogs.oracle.com/xmlpublisher/2009/06/data_template_progression.html
Thanks,
BIPuser -
Which user id is used in each data source?
Using SQ: SSRS 2008 R2 - Beginner - Is there a report or query that provides which user ID is associated with the data source of each report? I need to be able to list out all the data sources being used and which user id is being used in the data source
configuration instead of going to each report and using manage to review this. Any help is greatly appreciatedThank you - This is useful - but the username column is encrypted - how do I unencrypt
as per my knowledge there is no way to decrypt it and below link confirm my understanding :)but there is work around also that have shared on technet;
https://social.msdn.microsoft.com/Forums/en-US/f65b4d50-abaa-400b-a09d-ae1d7d1ea041/decrypt-the-connectionstring?forum=sqlreportingservices
WITH XMLNAMESPACES -- XML namespace def must be the first in with clause.
(DEFAULT 'http://schemas.microsoft.com/sqlserver/reporting/2006/03/reportdatasource'
,'http://schemas.microsoft.com/SQLServer/reporting/reportdesigner'
AS rd)
,SDS AS
(SELECT SDS.name AS SharedDsName
,SDS.[Path]
,CONVERT(xml, CONVERT(varbinary(max), content)) AS DEF
FROM dbo.[Catalog] AS SDS
WHERE SDS.Type = 5) -- 5 = Shared Datasource
SELECT CON.[Path]
,CON.SharedDsName
,CON.ConnString
FROM
(SELECT SDS.[Path]
,SDS.SharedDsName
,DSN.value('ConnectString[1]', 'varchar(200)') AS ConnString
FROM SDS
CROSS APPLY
SDS.DEF.nodes('/DataSourceDefinition') AS R(DSN)
) AS CON
-- Optional filter:
-- WHERE CON.ConnString LIKE '%Initial Catalog%=%TFS%'
ORDER BY CON.[Path]
,CON.SharedDsName;
Thanks
Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem. http://techequation.com -
Error when attempting to download SQ01 query data to Excel
Hi Experts ,
I am getting error when attempting to download SQ01 query data to Excel .
Error message - Contact your system administrator. The following template is missing: sap_om.xls
Message no. 0K 407
I have looked through the SAP GUI installation files and can find no record of the missing file
HelpHi
Please check SAP note 305900 & 803067
Regards
Ravinder -
Pls. identify some seeded views used as Existing Data Source in DBI Reports
Hi!
Can someone please identify some seeded views used as Existing Data Source in DBI Reports. I only need some idea how they are defined.
Thanks.Jon632 wrote:
Hi!
Can someone please identify some seeded views used as Existing Data Source in DBI Reports. I only need some idea how they are defined.
Thanks.
You can find the list of seeded views in eTRM website -- http://etrm.oracle.com/pls/etrm
Are there seeded tables/views of DBI dimension objects in Oracle EBS?
Thanks,
Hussein -
Setting Query Data Source Arguments Property for Block with TYPE Procedure
Hi,
I have a block whose type is 'Procedure', this returns a PL/SQL table.
I pass an IN OUT variable declared in the Package header and all works well.
What I need to know is how, if I have ANOTHER argument, how do I set it programatically prior to EXECUTE_QUERY.
I can see how to set the Name and Value manually at the "Query Data Source Arguments" property but if I need to set it dynamically in the code how would I do it.Thanks,
Worked it out.
Set the VALUE to the name of a Global variable and populated the variable before executing the procedure.
Thanks
Maybe you are looking for
-
Smartview indentation no longer working with upgrade
We are currently running HFM and Smartview with Office 2010. We have updated Smartview from version 11.1.2.1.x Build 271 to 11.1.2.2.310 Build 247. The Zoom In function is no longer working properly. In the prior version: 1. Zoom In = Next Level 2. M
-
I keep getting a pop up on Itunes when I try to add a file saying that ITUNES HAS STOPPED WORKING AN NEEDS TO CLOSE. W indows will notify me when corrected. iuninstalled and reinstalled 3 times to no avail. how do i fix?
-
How to subtract in pages chart
In the program "PAGES" I constructed a chart that requires adding two values (WHICH I CAN DO) and then subtracting another value from that product. I CAN FIND SUM but how the heck do you subtract?????? I am frustrated.
-
How to mirror my Ipad to a pc?
Please help me? My wife is a teacher and I got her a ipad 2 and she needs to use it with her smart board. If she could mirror the ipad to her computer she would be able to use the apps that she has downloaded to her ipad. Then the students could s
-
A lot of problems with my xperia z2 :\
So I bought my xperia z2 like 2 months back, and ever since i bought it, it kept restarting over and over without a warning or anything. But sometimes this problem stops but comes back later -.- . anyway, so yesterday i went to a swimming pool and re