Will REF CURSOR support for Oracle Forms 6i?

Hi,
I need to use ref cursor in my from. My cursor query should be dynamically append the "where clause". Hence I used the dynamic query with ref cursor.
But my problem is , when I compile the form it gives error for the line " OPEN emp_record FOR l_query;"
You need to use "select" statement.
Is there any solution for this in forms?
I know it supports for other PL/SQL areas.
Please help me. below is my code sample,
  DECLARE
TYPE emp_refcur IS REF CURSOR;
emp_record    emp_refcur;
TYPE rec_emp_data IS RECORD
    emp_no              VARCHAR2(40),
  emp_rec             rec_emp_data;
  l_query               VARCHAR2(4000);
BEGIN
     l_query := 'SELECT empno
                 FROM emp ';
      IF :CONTROL.ename IS NOT NULL THEN     
          l_query := l_query||' AND ename = '''||:CONTROL.ename||''' ';           
      END IF;
     OPEN emp_record FOR l_query;
     LOOP
        FETCH emp_record INTO emp_rec;
        EXIT WHEN emp_record%NOTFOUND;
       dbms_output.put_line(emp_rec.emp_no);
    END LOOP;
    CLOSE emp_record;     
END;      Thanks
Rajesh

Hi,
It's been a while since I used Forms 6i, but I remember hitting a similar problem. I don't think (and stress think!) that the PLSQL engine that comes with Forms 6i recognises ref_cursors.
The work-around I used was to move the functionality to the database and call it from forms.
Hope this helps.
Regards
Ian

Similar Messages

  • Ref Cursor Problem in Oracle Forms 6i

    Hi all.
    In Oracle Forms 6i, can not I do this?
    DECLARE
    TYPE CUR_REF IS REF CURSOR;
    CUR_PRODUCTS CUR_REF;
    VAR_QUERY VARCHAR2(3000) := 'SELECT something FROM table';
    BEGIN
    OPEN CUR_PRODUCTS FOR VAR_QUERY;
    END;
    It generates error on opening that it expects a SELECT statement.
    How can I open a dynamic ref cursor in Oracle Forms 6i??? The same thing works fine in PL/SQL.
    Regards,
    Zaaf
    Thanks in advance.

    It could be like this:
    PROCEDURE dynamic_cursor ( PC$Clause  IN Varchar2 )
    IS
      cursor_number EXEC_SQL.CursType;
      -- Variables for the data to be returned into
      LC$ACTYPE       Number;
      -- Control variables
      LN$count       Number;
      LC$sql_order   Varchar2(256);
    BEGIN
         -- Open the cursor --
         cursor_number := Exec_SQL.Open_cursor;
         -- build the complete SQL order -- 
         LC$sql_order := PC$clause  ;
         -- Parse the SQL order --
         EXEC_SQL.PARSE(cursor_number, LC$sql_order);
         -- Define the columns for the data to be returned --
         EXEC_SQL.DEFINE_COLUMN(cursor_number,1,LC$ACTYPE);
         -- Execute the Cursor --
         LN$count := EXEC_SQL.EXECUTE(cursor_number);
         -- Loop and fetch each row from the result set --
         While EXEC_SQL.FETCH_ROWS(cursor_number) > 0 Loop
           EXEC_SQL.COLUMN_VALUE(cursor_number,1,LC$ACTYPE);
              begin
                select chqfac, pasfac, indbcr ,
                staxfl, excise, incchg, cat001 , trntyp , subtyp
                into s_chkbok, s_pasbok, s_intber,
                s_staxfl, s_excise, s_incchg, s_cat001 , ss_trntyp , ss_subtyp
                from stfeacty
                where brancd = s_brancd
                and actype = LC$ACTYPE;
                s_actype := LC$ACTYPE ;
              exception
                when no_data_found then
                  NULL;
                when too_many_rows then
                  NULL;
              end;
         End Loop ;
         -- Close the cursors
         EXEC_SQL.CLOSE_CURSOR(cursor_number);
    EXCEPTION
      When EXEC_SQL.INVALID_CONNECTION Then
         message('Unexpected Invalid Connection error from EXEC_SQL');
      When EXEC_SQL.PACKAGE_ERROR Then
         message('Unexpected error from EXEC_SQL: '||to_char(EXEC_SQL.LAST_ERROR_CODE)|| EXEC_SQL.LAST_ERROR_MESG);
      If EXEC_SQL.IS_OPEN(cursor_number) Then
        EXEC_SQL.CLOSE_CURSOR(cursor_number);
        message('Exception - Cleaned up Cursor');
      End if;
    END; That you could call with the following:
    dynamic_cursor('SELECT ac_type FROM SYSADM.SAVINGS');But, if the query is as simple with only the table name change, you could aslo use a simpliest solution based on a record group.
    Francois

  • IDE Support for Oracles Forms and Reports

    Hi All,
    I am beginning a software integration project and would really appreciate it if you could give me some guidance. I wish to find an IDE that will support Oracle Forms & Reports (6i and 9i/10g) development (in particular support for coding of .rdf and .fmb files) either natively or via a plug-in. Is anyone aware of such an IDE or plug-in? Thanks in advance.
    -S

    Thanks for your input Jacob, that answered my question. I was wanting to know if there was any IDE that could be used to develop fmb's or rdf's, either natively or with a plug-in. From your response, I now know there are not.

  • Is Windows 7 64 bit support for Oracle Forms and Reports 6i version

    Hi All,
    Greentings!
    Its urgent requirement from customer to Install Oracle Forms and Reports 6i Client software in Windows 7 64 bit OS.
    Can any one please help me to download and Install the same. It would be great if you send me the download link and steps to Install.
    Many thanks in advance!
    Kind Regards,
    Mohan

    That is a very very old product. It does not look like it is certified on that OS.
    Forms 6i Documentation
    http://www.oracle.com/technetwork/documentation/6i-forms-084462.html
    From
    http://download.oracle.com/otn_hosted_doc/forms/forms/A73154_01.pdf
    1.2.1.2 Operating System
    This version of Forms Developer requires Microsoft Windows. Specifically, one of the following versions:
    Windows 95 (any version)
    Windows 98 (any version)
    Windows NT (Service Pack 5 or later)
    For certification you should check with Middleware Certification (MOSC)

  • Multilingual Support for Oracle Forms on 9iAS

    I have created a standard form in English and deployed it on the Oracle 9iAS. I want my form to support German language in addition to English i.e the GUI elements should be displayed in german language.
    How do i acheive that?

    Hello,
    Look at this article : http://www.oracle.com/technology/products/forms/pdf/translationhuboverview.pdf
    Francois

  • Using ref cursor in after parameter form in reports

    hi everyone,
    I have problem in usage of ref cursor in after parameter form. My actual requirement is I have user parameter :p_minval, :p_maxval. The values into these user parameters will be coming dynamically using sql_statement as shown below
    select min(empid),max(empid) into :p_minval, :p_maxval from emp where empid in (:p_emp);
    I will be writing this query in the after parameter form
    :p_emp is a lexical parameter as per me but the after parameter form is taking it as a bind variable. so I decided to define a ref cursor and then use it for retrieve. But when I use ref cursor it is returning pl/sql error 591 saying that this is not supported by client side can anyone help me plz..
    The following is the code i tried to use in after parameter form
    function afterPform return boolean is
    type rc is ref cursor;
    l_rc rc;
    sqlstmt varchar2(512);
    begin
    sqlstmt:='select min(empid),max(empid) from emp where empid in ('||:p_emp||')';
    open l_rc for
    select max(empid) from emp where empid in ('||:p_emp||')';
    fetch l_rc into :p_maxval;
    close l_rc;
    return(true);
    end;
    thanks & regards
    venkat

    I ran into the same problem. any body knows why?

  • Latest version available for Oracle Forms and Reports in 11g AS

    Deaer Friends,
    Please let me know latest version available for Oracle Forms and Reports in 11g Application Server and let me know whether it is supported in Windows - 64 Bit Platform
    Regards,
    DB

    DB,
    Oracle Forms and Reports 11g Release 2 (11.1.2) is the most recent forms and reports.
    If you're on 11.1.1.x (for example 11.1.1.5 or 11.1.1.4), please refer to http://docs.oracle.com/cd/E24269_01/doc.11120/e23975/upgrade_from_r1.htm for upgrade procedure.
    Otherwise, if you're installing it brand new, download Oracle Forms and Reports 11gR2 (11.1.2.0.0 from http://www.oracle.com/technetwork/developer-tools/forms/downloads/index.html
    HTH,
    Raj Mareddi
    http://www.freeoraclehelp.com

  • Request for Oracle forms & Reports 12c: Free runtime in GlassFish like ADF

    a) FREE RUNTIME LICENSE IN GLASSFINS FOR ORACLE FORMS & REPORTS IN GLASSFISH
    Hello, we are Oracle Partners and we are using oracle since Oracle 7.3.4.
    I remember a beta of Oracle Forms, having the functionality to set properties in all objects, just like Visual Basic, including lines, etc. But that beta was rejected and I see Oracle had leave Oracle Forms as just a database client.
    In this moment there is a free light version of ADF.
    I will like you think in that possibility.
    Think in this, if you want to program a small software, I mean 20,000 U$, and the runtime is 40,000 U$, then this doesn't makes sense.
    Oracle is pushing small customers toward Visual Studio,
    I think the idea of a free runtime will benefit Oracle in two ways.
    For a 20,000 U$ software or less, you but Visual Studio, Sql Server 2012 is enough, not as Oracle, but is enough for that small softwares,
    this means if you give a free runtime of oracle forms & reports (like adf is doing)
    1) you will win selling development licenses and 2) selling Oracle Standard One licenses.
    If you don't do you will lose developement licenses and Oracle will continue losing the small databases market, because this is not like 10 years ago, Sql Server and other databases had improved, and the hardware too .
    2) THE DEVELOPMENT OF A LINUX MORE EASY TO INSTALL & AN EASY DESKTOP FOR THAT LINUX
    The other point I want to give feedback is linux, it's too related to oracle forms & reports improvements for small business
    Is the development of an easier Linux, to use 1) for development 2) for production.
    In the same way you don't wait 60 seconds in a normal web page to load, people don't like Linux because is not like Microsoft Windwos or Macintosh; so if Oracle wants to move to people to use linux to use Oracle Forms or Oracle Database, I think Oracle must create a more simple and tested installation for both customers and developers,
    - less is more, so the installation must have only what normally is needed.
    - you should not need to use command line for most operations, this should be an exception, normal users must do things by themselves.
    Thank you for your time

    I don't know that it will break things, but I can say that the safest thing to do would be to use separate WLS installations for each product. This may sound like overkill, but each product (ADF, Forms/Reports) have their own idiosyncrasies and requirements with respect to versions and patching, and trying to mix and match them in the same WLS installation is not, in my opinion, something that's worth undertaking.
    I have the very setup I describe (separate WLS installations for ADF apps and Forms/Reports apps), and it's working with no problems.
    Regards,
    John

  • How to out Dynamic ref cursor from Procedure to Forms

    Hi
    I am trying to out Dynamic ref cursor from Procedure to Forms, But I am unable to do so. however cursor return the value within procedure but I am failed to capture the same in Forms
    Pl advice suggestion if any, Here I am attaching full procedure for reference
    CREATE PACKAGE winepkg
    IS
    TYPE wine IS RECORD ( mynumber number);
    /* Define the REF CURSOR type. */
    TYPE wine_type IS REF CURSOR RETURN wine;
    END winepkg;
    CREATE procedure find_wine
    (col1_in in number,
    c1 out winepkg.wine_type) as
    vsql varchar2(1000);
    cur sys_refcursor;
    x number;
    BEGIN
    vsql:='select bo_id from bo_details where bo_details.bo_id = '||col1_in ;
    open cur for vsql;
    c1:=cur;
    --fetch c1 into x;
    --dbms_output.put_line(x);
    END find_wine;
    In front end forms
    Declare
    TYPE F is REF CURSOR;
    CUR_F F;
    rec number;
    Begin
    break;
    find_wine( 1601480000011078,cur_f ) ;
    Loop
    fetch cur_f into rec ;
    Message(rec ) ;pause;
    exit when cur_f%notfound ;
    End loop ;
    exception
    when others then
    Message(sqlerrm) ;pause;
    End ;

    yo can use
    declare
    c_cursor EXEC_SQL.CursType;
    v_stmt varchar2(2000) = 'select a, b, c from mytab where cond1'; -- you can create this value dynamically
    begin
    c_cursor := Exec_SQL.Open_cursor;
    EXEC_SQL.PARSE(c_articulos, v_stmt);
    EXEC_SQL.DEFINE_COLUMN(c_articulos,1, v_colchar1, 30);
    EXEC_SQL.DEFINE_COLUMN(c_articulos,2, v_colchar2, 15);
    EXEC_SQL.DEFINE_COLUMN(c_articulos,3, v_colchar3, 30);
    v_exec := EXEC_SQL.EXECUTE(c_cursor);
    WHILE EXEC_SQL.FETCH_ROWS(c_cursor) > 0 LOOP
    EXEC_SQL.COLUMN_VALUE(c_cursor,1,v_colchar1);
    EXEC_SQL.COLUMN_VALUE(c_c_cursor,2,v_colchar2);
    EXEC_SQL.COLUMN_VALUE(c_c_cursor,3,v_colchar3);
    assign_values_to_block;
    END LOOP;
    EXEC_SQL.CLOSE_CURSOR(c_cursor);
    end;
    and WORKS IN FORMS 6

  • Jumbo Frames support for Oracle VM 3.0

    Hi all
    Is Jumbo frames supported for Oracle VM 3.0?
    I would like to configure for 2 ways of usage :
    1.For NFS usage (against NetApp server). The repository will be located on NFS.
    2. For Management Network,i.e dedicated network between the OV Manager and OV Servers.
    Thanks,
    Rudi

    Rudi wrote:
    Is Jumbo frames supported for Oracle VM 3.0?No. It's on the list of things to add, though.

  • Languages Supported in Oracle Forms

    Hi,
    Can anyone tell me which languages are supported in Oracle forms ,or with UTF8 characterset i can make forms6i to work for all languages.
    Please correct me ...
    Regards,
    Sandeep

    I don't think this feature is feasible for forms.
    Quoting the documentation from
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/manproc002.htm
    Database Resident Connection Pooling (DRCP) provides a connection pool in the database server for typical Web application usage scenarios where the application acquires a database connection, works on it for a relatively short duration, and then releases it.
    Forms keeps a permanent connection to the database, so a connection pool isn't gonna help you in any way.
    cheers

  • Installing support for Oracle Designer Objects in an existing repository

    We have been using SCM to store Forms and other files
    for our development work.
    Now I want to use Repository Reports in the Repository
    Object Navigator, this requires me to install support
    for Oracle Designer Objects.
    Can I use the Repository Administration Utility and
    Install support for Oracle Designer Objects
    without effecting the existing repository data?
    (I've tried metalink but keep getting TCP Error
    while logging the TAR).
    Cheers
    Sam

    How can i install oracle designer and prepare the repository at first on my personal my pc

  • Setup FORMS_PATH for Oracle Forms 10g in windows7

    Hi,
    Please kindly advise the regedit path to set the FORMS_PATH variable at windows for Oracle Forms 10g?
    Should it be HKEY_LOCAL_MACHINE > SOFTWARE > ORACLE?
    If yes, is it the unique path? since I cannot create folder for 'ORACLE'.
    Thanks,
    CY

    If you installed the product following the instructions found in MOS Note 559067.1 the registry key will have already been created for you.  It will be a sub to HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\<???>
    Find this in your system and look at the contents of each key below "Oracle".  It should be obvious which one belongs to Forms as there will be numerous FORMS_xxxxx entries there.

  • Is there any impact analysis tool for Oracle Forms and Reports

    Hi All
    We are curretly looking at tools available to do impact analysis in Oracle Forms and Reports. This is for the maintainance of a large Oracle application developed using forms and reports 10g. We use Oracle Designer but only to maintain the db structure and not for forms and reports generation. Our intension is to find out the impact of db model changes, stored procedure changes in Oracle Forms and Reports. Please suggest any tools that are currently used for this purpose.
    I remember manually maintaining the CRUD matrix for Oracle Forms and Reports for maintainance purpose. CRUD matrix will have the list of all the tables which are affected by the module. But this is a manual activity and hence the responsibility is with the dev team to keep the document updated. Please suggest if there is any alternative to this way which can be more effecient and less error prone...
    I also wonder how these are done in Oracle ERP? how the apps team in oracle is maintaining the forms and reports?
    Thnaks in Advance
    Mahesh Mathew

    Quest (the makers of TOAD) have a tool called SQL Impact which gathers data from forms, reports, triggers, packages etc.
    FormsMate is a simple, cheap alternative for comparing or searching in forms.
    http://www.jockvale.ca/products.html
    Alternatively, you can export forms to xml (with iff2xml90.bat) and reports to jsp (with rwconverter) and simply grep those and your sql scripts. There are grep tools for windows if you need.

  • CSS keepalives for Oracle forms server

    I'm trying to set up load balancing for oracle forms server and having issues with finding working keepalive method.
    If I use uri keepalive, Oracle forms server crashes within a couple of minuites. TCP doesn't work either
    service Ora-forms:9000
    ip address 192.168.0.34
    port 9000
    keepalive type http
    keepalive uri "/alive.gif"
    keepalive frequency 30
    It works for Oracle web server tho.
    What keepalive do you guy use for Forms server?

    Here is what a script looks like using the "graceful" close approach..Graceful is at the bottom.
    Regards
    Pete..
    !no echo
    ! Filename: ap-kal-fin
    ! Parameters: ip address
    ! Description:
    ! This script will open and close a socket on port 80.
    ! The close will be a FIN rather than a RST
    ! Failure Upon:
    ! Not establishing a connection with the host.
    ! Make sure the user has a qualified number of arguments
    if ${ARGS}[#] "LT" "1"
    echo "Usage: ap-kal-fin ip address.'"
    exit script 1
    endbranch
    ! Connect to the remote Host
    set EXIT_MSG "Connect: Failed to connect to ${ARGS}[1]"
    socket connect host ${ARGS}[1] port 80 tcp 2000
    no set EXIT_MSG
    socket disconnect ${SOCKET} graceful
    exit script 0

Maybe you are looking for