Problem during the setting the query data source name in forms 6i

We are now doing assignments in forms 6i actually there is a problem during setting the query data source name in run time.
The problem is
declare
v_query varchar2(200),
begin
v_query :='(select empno,ename,deptno from emp where hiredate =' || control .value1 ||')';
go_block('emp');
set_block_property('emp',query_data_source_name,v_query);
end;
that bolded area is the problem that ia varchar value the single qoutes embedded with that value.how can i embedded single qoutes in that concatenation.
That is now query will run like select empno,ename,deptno from emp where hiredate =control.value
But we need like select empno,ename,deptno from emp where hiredate ='control.value'
Message was edited by:
Punithavel

Thanks for your response
We fixed the error
and the answer is
declare
v_query varchar2(200),
begin
v_query :='(select empno,ename,deptno from emp where hiredate = ' ' ' || control .value1 ||' ' ' ) ' ;
go_block('emp');
set_block_property('emp',query_data_source_name,v_query);
end;

Similar Messages

  • 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?
    Regards

    Hi!
    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

  • 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

  • Multiple PS Query Data Sources in RTF Template

    Is it possible to use two PS Queries as Data Sources on an RTF template in XML Publisher?
    There is a field in the main Data Source (PS Query) that needs to join to some other tables. This slows down the query considerably even after tweaking the join and tuning, etc. Instead of doing the join in the main PS Query Data Source, can we do any of these?
    1. Do a select statement inside an RTF template Form Field?
    2. Use two PS Queries on the same RTF template?
    3. Import a sub template that uses its own PS Query Data Source for the field?
    Hope this makes sense. Thank you.

    You can have multiple data models and then use the 'concatenated SQL data source' to generate a single xml file that includes data based on both queries. You can not do a select statement inside a RTF template.
    Within the RTF template you can write logic to join the two data sets... see this blog post:http://blogs.oracle.com/xmlpublisher/entry/formatting_concatenated_dataso
    Thanks,
    Bipuser

  • 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

  • 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!

  • 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

  • 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

  • WIS: 10901 Data source name not found and no default driver specified(ODBC)

    Hi, gurus.
    We've created a universe based on Excel spredsheet or MS Access which is using ODBC connection. Then, I try to create query (which is using these universe) in QAAWS or in InfoView, and when I add a filter object to the query, the error occurs:
    "GetDatasourceObject LOV exception (error WIS: 10901)".
    If I don't choose any filter options and want to create query, I'm getting the error: ' [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (error WIS: 10901)'.
    We tried to do this in different operations systems - Windows 7 (32 bit) and XP (32 bit).
    Anymore, we can use this universes at web intelligence rich client with or without filters.
    Need to solve this problem. Please help us.

    Dear all,
    I got the same problem, I have installed BOE 4.0 at Win XP 64 bits, and also installed Sybase IQ 15.2 (32bit) ODBC, and has create the odbc entry "shkdemo" at the System Tab. However, I still got the same error when using the the "Interactive Analysis" thru "BI Launch pad".
    For BOE 4.0, I found that I could only use the BOE Client tools (Universal Design Tool) to create the connection, this client tool I installed it at another 32 bit XP laptop, and I also installed the Sybase IQ 15.2 (32bit) ODBC with the same odbc entry "shkdemo", and using the "Interactive Analysis Desktop, I could be able to create report with data from IQ 15.2.
    Kindly advise, why I still got the error of "10901 Data source name not found and no default driver specified(ODBC)" when I use the "Interactive Analysis" thru "BI Launch pad".
    Cheers,
    Hilda

  • Data Source Name Not Found

    Hey, wonder if anyone has had this problem and knows how to
    solve it. I have a book with details on how to solve the error but
    its hard to understand. The error is: 80004005 - Data source name
    not found and no default driver specified.
    In the book it says "To solve the problem, first be sure that
    the DSN exists on the web server as a system DSN. If the DSN exists
    as a Local DSN, delete the Local DSN and create a System DSN". How
    do I know if it exists as a Local DSN and how do I make sure it
    exists on the web server as a system DSN?? I also deleted the
    locked Access file (.ldb) as suggested in the book.
    I know this is a specific problem and maybe I've missed
    something out, but I'd be really grateful for any help. Thanks very
    much.

    Try here:
    http://tinyurl.com/pbnon
    "ferrarikid123" <[email protected]> wrote in
    message
    news:e3b64c$mqp$[email protected]..
    > Hey, wonder if anyone has had this problem and knows how
    to solve it. I
    > have a
    > book with details on how to solve the error but its hard
    to understand.
    > The
    > error is: 80004005 - Data source name not found and no
    default driver
    > specified.
    >
    > In the book it says "To solve the problem, first be sure
    that the DSN
    > exists
    > on the web server as a system DSN. If the DSN exists as
    a Local DSN,
    > delete the
    > Local DSN and create a System DSN". How do I know if it
    exists as a Local
    > DSN
    > and how do I make sure it exists on the web server as a
    system DSN?? I
    > also
    > deleted the locked Access file (.ldb) as suggested in
    the book.
    > I know this is a specific problem and maybe I've missed
    something out, but
    > I'd
    > be really grateful for any help. Thanks very much.
    >

  • ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in windows server 2008 r2

    ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in windows server 2008 r2.I made a application in asp.net c#.I am using ODBC connection.When I deployed my application in windows server2008 r2.There
    is no Microsoft ODBC driver shown in ODBC Data source administrator.Then I go to the C:\Windows\SysWOW64 and open  Odbcad32.exe and add Microsoft ODBC2 driver for Oracle and when I run my application I got following error
    ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    I am using follwoing string
     <connectionStrings>
    <add name="theconnetion" connectionString="DSN=abdb;UID=abc;PWD=xyz"/>
     </connectionStrings>
    Guide me What I do?

    Did you add a System DSN or a User DSN? If you added a User DSN from your own login, the asp.net application will not be able to use it unless its application Pool in IIS is configured to run under the same credentials that you used for creating
    the DSN. It's better if you add a System DSN.
    Also, be careful to ensure that you are using a 64 bit DSN, unless you configure the application to run in 32 bits. If the 64 bit application attempts to use the 32 bit driver you get the same error message "Data source name not found and no default
    driver specified". See this KB article:
    http://support.microsoft.com/kb/942976/en-us

  • 10901 Data source name not found and no default driver specified(ODBC)"

    Dear all,
    I have installed BOE 4.0 at Win XP 64 bits, and also installed Sybase IQ 15.2 (32bit) ODBC, and has create the odbc entry "shkdemo" at the System Tab. However, I still got the above error when using the the "Interactive Analysis" thru "BI Launch pad".
    For BOE 4.0, I found that I could only use the BOE Client tools (Universal Design Tool) to create the connection, this client tool I installed it at another 32 bit XP laptop, and I also installed the Sybase IQ 15.2 (32bit) ODBC with the same odbc entry "shkdemo", and using the "Interactive Analysis Desktop, I could be able to create report with data from IQ 15.2.
    Kindly advise, why I still got the error of "10901 Data source name not found and no default driver specified(ODBC)" when I use the "Interactive Analysis" thru "BI Launch pad".
    Cheers,
    Hilda

    Remember the client tools are 32 bit, BOE 4.0 is 64 bit. Thus a document using a 32 bit client will connect to 32 bit ODBC datasource. A 64 bit application (BOE 4.0) will be looking for 64 bit ODBC datasource. You mention you installed Sybase IQ 15.2 (32bit) ODBC which is great for the 32 bit client tools, but 64 bit BOE will not be able to use this.
    See a related article; [Crystal Reports support of 64 bit Operating Systems|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10d5fa88-2013-2c10-c9a5-f11963607d4e]
    - Ludek

  • 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.

  • 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

  • How to find the Data source name on linux server

    Hello All,
    Good Morning...
    I created a rpd in my local machine and deployed on the server through Fusion middle ware.
    and copied the catalog file there in the server.
    While working on my local machine I have two odbc connections... one is for development and other is for production.
    at the time of deployment to the server I changed the development instance to production instance throught the connection pool.
    I am encountering the following error while working on the analyis....
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 16001] ODBC error state: IM002 code: 0 message: [DataDirect][ODBC lib] Data source name not found and no default driver specified. (HY000)
    I think this is because of the mismatch of the datasource name in server and my local machine...could you please tell me how to find the datasource names on the server?
    Thanks!

    Hi Dpka-
    I created two ODBC connections in my system.
    one for development and another for Production.
    while deploying the rpd to the server I changed the development login credentials with production login.
    The problem here is I just want to know whether Iam giving the same datasource name which was presented on the server or not.
    I don't have access to the server now.
    Is there any way to find out the datasource names which were presented on the server with the help of admin console?
    Thanks!

Maybe you are looking for

  • Clearing Doc has been reversed, but still assigned to Original Document

    Hi, Here's the condition: - Clearing document has been reversed, but instead of using FBRA, user use FB08. - Now the document still assigned to this clearing doc. - In FBL5N this doc is open (in BSIS table it does't have clearing doc also) , but when

  • Is it possible to pass a null Input Oracle parameter to a stored procedure

    I have a stored procedure that take 3 inputs and gives 1 output.I'm using Oracle parameter to add all 3 input parameters as follows : OracleParameter inobj = cmd.Parameters.Add("wid", OracleDbType.Int32,50); inobj.Direction = ParameterDirection.Input

  • Cisco Prime 1.3 and email alerts

    I want to create some basic alarms on our infrastructure. I want to monitor only specific ports on specific switches. I do not want to monitor client ports, only uplinks to distribution/core and server ports. Is it possible to get alerts only from sp

  • IDOC Creation with message control

    I have created an IDoc using standard FM ' MASTER_IDOC_DISTRIBUTE' (without message control) for my own table. Now, I want to create IDoc with message control to send data from SAP to SAP. Can anyone please tell me the steps to create IDoc for my own

  • Wireless Printing using Time Capsule

    I tried to print wirelessly but I keep getting the message: There is a problem communicating with the printer. What am I not doing?