Query Data Source Type
hi,
I can't create...
Query Data Source Type: FROM clause query
Query Data Source NAme: (select t.col1 as cl1,t.clo2 as cl2, m.col1 as cl3
from tab1 t, tab2 m)
WHERE clause: cl1=:master.col1 and cl3=:master.col3
is not work....
form's 6i
thank's
Jomar
You can not use where condition if query data source type is
From Clause Query.
Use DB view and filter data by Where clause in the block.
D
Similar Messages
-
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 -
Block Property (Query Data Source Type)
Hello Friends
I am using Forms 6i.oracle 9i.
in the Block Property Pallete under Query Data Source Type there
are 4 Type is mentioned.i have used Table,From Clause Query but yet to use Transactional Trigger and Procedure.How to use this two and it will be very kind enough if u give any example about these twos.
RegardsThere's a whole bunch of explanation about this subject in the online help of Forms. Just select the Query Data Source Type property and press F1. The initial explanation is very limited but there are a number of useful links under "Related topics"
-
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 -
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 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! -
FROM Clause query data source type
i do i get the result set of a FROM Clause datasource into an item.
A FROM clause may be used as the datasource for a data block. A FROM clause is a feature of the Oracle8 Server that allows you to nest a SELECT statement in the FROM clause of a SELECT statement. A FROM clause is a valid query block datasource, but it is not a valid DML block datasource. The value returned from a FROM clause is a subset of records from the original query.
FROM clauses are used to perform joins, lookups, and calculations without having to create a view on the server. FROM clauses can also be used to prototype views and to increase performance.
Using a FROM clause as a block datasource is similar to using an updateable join-view as a block datasource. However, a FROM clause provides more control, because the presence of a DBA is not required to define the view. You should note that the FROM clause produces results that are identical to an updateable join-view from the client side, but that there is no defined view on the server.
My question has not been answere and i hope the above copies explanation from forms6i documentation will help understand the question better.
Please Advise -
Frm-41380 error - cannot set the blocks query data source
Fairly new forms so bare with me. I am creating a form based on one table. This table has one column that is a nested table.
table name: szrtime
table columns: szrtime_code, szrtime_styp_list
szrtime_styp_list is a table of varchar2(1).
main block is szvtime_block
the block that contains the nested table is szvtime_styp_block
I read that I could use a WHEN_NEW_RECORD_INSTANCE trigger on the main block to display the related nested table. I have tried the folllowing:
Declare
select_stmt Varchar2(512) ;
Begin
If :szvtime_block.szvtime_code Is not null Then
select_stmt := '(SELECT column_value FROM TABLE ( SELECT szrtime_styp_list FROM szrtime WHERE szrtime_code = ''' || :SZVTIME_BLOCK.SZVTIME_CODE || '''))';
Go_Block('SZVTIME_STYP_BLOCK' );
Clear_Block ;
message('select_stmt = '||select_stmt);
Set_Block_Property( 'SZVTIME_STYP_BLOCK', QUERY_DATA_SOURCE_NAME, select_stmt ) ;
Execute_Query ;
Go_Block('SZVTIME_BLOCK') ;
Else
Go_Block('SZVTIME_STYP_BLOCK' );
Clear_Block ;
Go_Block('SZVTIME_BLOCK') ;
End if ;
End ;
The result is the frm-41380 error.
I have tried change the query data source type on the nested table block to Table or From-clause but did not help. The select statement that is valid and returns the correct result in Toad.
Any suggestions on what to look for? Thank you.
Todd> But what is giving me pause is that the user will be updating, deleting, and inserting
into this table and, of course, the nested table column.
It would give me pause, too. I've never used nested tables, so I poked around in Forms on-line help. In Forms 6i, it specifically states that Forms does not support the Nested Table structure.
In Forms 10g help, it describes Nested Table structures, but says NOTHING about how a form would handle it. And that implies to me that it is still not supported. So good luck.
In addition to creating the view, you may need to provide your own nested table updating procedures via a package on the server which your form can call. I know Forms supports passing pl/sql tables ("indexed by binary_integer"), so you could pass your nested table back and forth between the package and the form in that format. -
About Query Data Source Columns property
Hello everyone,
I'm new to Oracle Forms version 10.1.0.2.
When I create a data block based on a table using Data Block Wizard, the block's Query Data Source Columns property is automatically populated with column definition entries corresponding to the columns of the base table.
I tried making changes to these entries, for example by changing the data types to wrong data types or even deleting them, and I found that those changes had no effect on the block at all. The form was still working as I wanted.
Please explain what is exactly the role of the block's Query Data Source Columns property.
Thank you very much.
p.s: The F1 key help says "The Query Data Source Columns property is valid only when the Query Data Source Type property is set to Table, Sub-query, or Procedure". So, please explain in each context of Query Data Source Type.p.s: The F1 key help says "The Query Data Source Columns property is valid only when the Query Data Source Type property is set to Table, Sub-query, or Procedure". So, please explain in each context of Query Data Source Type.
IMHO those properties are very self-explaining: It is the data source of the block, or in other terms: how it is populated.
Table means the data block is based on a table and subsequently will be populated by
select col1, col2, col3 from your_table
With sub-query the block will be populated with your subquery; forms will issue
select col1, col2, col3 from (
-- this is your subquery
select col1, col2, col3 from tab1, tab2 where [....]
With Procedure in short you'd have a stored procedure which returns a ref cursor and the block will be populated by the ref cursor.
As for your question about the name: this actually should matter; the default is NULL which means that there needs to be a column which has the exact name as the item so in the above sample with table the item associated with your_table.col1 should be named col1. If it isn't the property should be named like the column. If this property also doesn't reflect the name this shouldn't work IMO.
cheers -
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 -
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 -
Forms clause query data source data block in oracle forms
Hello experts,
I am new in oracle forms.I am using oracle forms 11g with weblogic 10.3.5 at windows 7.Through googaling I know how to create a database block,forms clause data block and stored procedure based datablock in oracle forms.I want to know that as in case of Database based datablock, could we commit form either on editing records or on insertion or deletion in data block.
I tried this but got error frm 40501.If we can perform editing and creation in such type of datablock then please tell me how.
Thank You,
regards
aadityaWhen I base my datablock on a query using the "From Clause" property of the block query data source in the oracle Forms 6i,
I get the strange error
"ORA-00928: missing SELECT keyword"
The query I see in the Display Error in Help Menu is
SELECT DAY_NUMBER,CONSULTANT_ID,EVENT_ID,EVENT_NUMBER,SESSION_NUMBER,HOURS_UNPAID,HOURS_PAID,PAPERWORK FROM (EVENT_ASSIGNED_CONSULTANT) WHERE (CONSULTANT_ID=:1)
What should I do now?????? Please remove the brackets () from the table name.
Instead of (EVENT_ASSIGNED_CONSULTANT) use
EVENT_ASSIGNED_CONSULTANT -
External Data source not appearing in Data source type
Hello,
I use SQL Server 2012 BI Edition and use Data tools to create reports. I have a 3rd party Data source. While creating a new shared data source, I cannot get it to appear under the Data Source Type. Only the current built in types are available. For test
purposes, I tried editing the RSReportServer.config and added a duplicate entry and it was shown in the dropdown. What should I do?
When this 3rd party data source is installed, under Tools --> Connect to Database, I am able to get that datatype and connect to my data source. I tried uninstalling and this option goes away.
Regards
Vivek.Hi Vivek,
Based on my research, the error always occurs when you load custom extensions in SQL Server 2012 Data Tools or use Report Builder 2.0 to run an SSRS 2008 or SSRS 2008 R2 report that uses a custom data processing extension in server mode. According to your
description, it seems that you are not in those two scenarios. So I think this issue can be caused by that the Custom Data Process Extension is not deployed correctly in SQL Server Reporting Services.
The following document about Implementing a Data Processing Extension in Reporting Services is for your reference:
http://www.codeproject.com/Articles/22946/Implementing-a-Data-Processing-Extension
Besides, please note that Report Builder is currently not extensible, and can't load custom data extensions or custom query designers. We can refer to the method posted by Robert to work around this issue:
https://go4answers.webhost4life.com/Example/custom-data-sources-report-builder-30-15682.aspx
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Power view couldn't load the model or data source because the data source type is not supported
Hi,
I have SQL 2012 standard edition in my local. I have developed SSAS & deployed in local. I have been asked to develop power view report in excel 2013 using this SSAS. But when I tried to do in Excel 2013 professional Plus, I am getting below error:
Power view couldn't load the model or data source because the data source type is not supported.
Does power view is supported in standard edition of SQL or it requires Business/Enterprise edition of SQL server?
Thanks in advanceWhat type of SSAS install are you using?
PowerView in Excel 2013 currently only supports Tabular data sources.
Only PowerView in Sharepoint 2013 supports both Tabular and Multi-Dim data sources. (provided you have the required Sharepoint and SQL updates installed)
http://darren.gosbell.com - please mark correct answers -
Question on Dynamic Query Data Source and Form Folders in Oracle Forms 6i
Hi there -
I have one interesting requirement in Oracle Forms.
This is what I wanted to do.
1. Have a LOV and Go button on Form.
2. From LOV, I will select a pre-defined custom table and click Go.
3. Based on the selected custom table, I have to populate the Block (Tabular Format).
4. User should be able to do update, delete, insert on this block.
5. User should be able to use the Oracle Form folders functionality (select only necessary column and save views etc. Std folder functionality).
6. If user selects a different custom table name in the LOV on top, I need to refresh the data from the block based on this new table. Remaining functionality should be as it is (steps 3 to 5).
You can see here, I am going to have dynamic query data source (Table Name as well as column mapping) on the block. I do not know before hand how many columns the user selected table has!
This is what I have planned for this so far but I have some major questions before I can move on with this design:
1. I am going to create a table structure with fixed number of column in form (40 cols assuming that the custom table will not have more that 40 cols). (Kind of limitation but it's okay as of now).
2. Dynamically populate the block based on the table name selected by the user from LOV. Dynamically change the table column names based on the table selected etc.
3. Perform insert, update, delete using PL/SQL package.
So far it looks okay.
Now my real question is,
Can user still be able to user "Folders" functionality here? I have never done this kind of development before and I doubt the dynamic column naming, dynamic column data source will really work for "folders"!
Also, I am not really sure whether user will be able to save these "folder" queries?
Okay so form experts, can you ppl suggest me if this is really going to work? Are there any better ways to do this?
Initially I tried to do this in OA Framework but I got stuck at because as per OAF developer guide "I cannot user OAF personalization for dynamic items, regions etc".
For more info on that thread see this link...
Re: setUserCustomizable issue!
Thanks in advance for the help.Any suggestion anyone?
Maybe you are looking for
-
Printing from a Mac Book Pro to a Windows 7 64 Bit Box
Before I upgraded to Win 7 I have no problem printing from my MBP (snow leopard) to my Canon IP4300 hooked up to my Vista Ultimate Box. Once I upgraded it to Win 7, I can no longer print. We have 2 Mac Book Pro's and this error can be duplicated on b
-
Printing intermediate object (images) stored in an internal table
Hi All, I'm fetching certain imgaes / documents from a 3rd party repository system (IXOS) and storing the objects in an internal table in a program, later to download them onto the Presentation Server through an ABAP Program. But instead of downloadi
-
How to avoid repeating printing in oracle applications
we have a report which is printing repeatedly for a particular report, what could be the reason?
-
Invalid persistence handling in wls 11g
Hi Current release of weblogic server 11g (10.31) still can't correcly handle persistence.xml's First, in wls ear/ejb's modules do not see persistence xml's added to ear root folder META-INF (like in Jboss or Webshphere) Second, ear's with persistenc
-
HT4906 i had iPhoto and now that i erased the hard drive i phot is gone
my computer came with iphoto i recently resored the computer to its original purchase state and now the iphoto is missing. any idea why?