PLS-00428 Why SELECT must be adorned with REF CURSOR to work?

hello
*"PLS-00428: an INTO clause is expected in this SELECT statement"* - This problem has been resolved. I just want to understand WHY SELECT statements need to be paired with REF CURSOR.
          To reproduce this,
               DECLARE
                    Id1 numeric(19,0);
                    Id2 numeric(19,0);
                    CreateTimestamp date;
               BEGIN
               -- ATTN: You'd either need to select into variable or open cursor!
               select * from SystemUser left join Person on Person.Id = SystemUser.PersonId WHERE Person.PrimaryEmail in ('[email protected]','[email protected]');
               END;
          Solution?
               * In install script:
                    CREATE OR REPLACE PACKAGE types
                    AS
                         TYPE cursorType IS REF CURSOR;
                    END;
               * Then in your query:
                    DECLARE
                         Id1 numeric(19,0);
                         Id2 numeric(19,0);
                         Result_cursor types.cursorType;
                    BEGIN
                    OPEN Result_cursor FOR select * from SystemUser left join Person on Person.Id = SystemUser.PersonId WHERE Person.PrimaryEmail in ('[email protected]','[email protected]');
                    END;
I Googled for reasonable explaination - closest is: http://www.tek-tips.com/viewthread.cfm?qid=1338078&page=34
That in oracle block or procedures are expected to do something and a simple SELECT is not!! (Very counter intuitive). What needs to be done is therefore to put the select output into a ref-cursor to fool oracle so that it thinks the procedure/block is actually doing something. Is this explanation right? Sounds more like an assertion than actually explaining...
Any suggestion please? Thanks!

Opening a cursor (ref cursor or otherwise) is not the same as executing a select statement.
A select statement returns data, so if you are using it inside PL/SQL code it has to return that data into something i.e. a local variable or structure. You can't just select without a place for the data to go.
Opening a cursor issues the query against the database and provides a pointer (the ref cursor), but at that point, no data has been retrieved. The pointer can then be used or passed to some other procedure or code etc. so that it may then fetch the data into a variable or structure as required.
It's not counter-intuitive at all. It's very intuitive.

Similar Messages

  • ORA-01008 with ref cursor and dynamic sql

    When I run the follwing procedure:
    variable x refcursor
    set autoprint on
    begin
      Crosstab.pivot(p_max_cols => 4,
       p_query => 'select job, count(*) cnt, deptno, row_number() over (partition by job order by deptno) rn from scott.emp group by job, deptno',
       p_anchor => Crosstab.array('JOB'),
       p_pivot  => Crosstab.array('DEPTNO', 'CNT'),
       p_cursor => :x );
    end;I get the following error:
    ^----------------
    Statement Ignored
    set autoprint on
    begin
    adsmgr.Crosstab.pivot(p_max_cols => 4,
    p_query => 'select job, count(*) cnt, deptno, row_number() over (partition by
    p_anchor => adsmgr.Crosstab.array('JOB'),
    p_pivot => adsmgr.Crosstab.array('DEPTNO', 'CNT'),
    p_cursor => :x );
    end;
    ORA-01008: not all variables bound
    I am running this on a stored procedure as follows:
    create or replace package Crosstab
    as
        type refcursor is ref cursor;
        type array is table of varchar2(30);
        procedure pivot( p_max_cols       in number   default null,
                         p_max_cols_query in varchar2 default null,
                         p_query          in varchar2,
                         p_anchor         in array,
                         p_pivot          in array,
                         p_cursor in out refcursor );
    end;
    create or replace package body Crosstab
    as
    procedure pivot( p_max_cols          in number   default null,
                     p_max_cols_query in varchar2 default null,
                     p_query          in varchar2,
                     p_anchor         in array,
                     p_pivot          in array,
                     p_cursor in out refcursor )
    as
        l_max_cols number;
        l_query    long;
        l_cnames   array;
    begin
        -- figure out the number of columns we must support
        -- we either KNOW this or we have a query that can tell us
        if ( p_max_cols is not null )
        then
            l_max_cols := p_max_cols;
        elsif ( p_max_cols_query is not null )
        then
            execute immediate p_max_cols_query into l_max_cols;
        else
            RAISE_APPLICATION_ERROR(-20001, 'Cannot figure out max cols');
        end if;
        -- Now, construct the query that can answer the question for us...
        -- start with the C1, C2, ... CX columns:
        l_query := 'select ';
        for i in 1 .. p_anchor.count
        loop
            l_query := l_query || p_anchor(i) || ',';
        end loop;
        -- Now add in the C{x+1}... CN columns to be pivoted:
        -- the format is "max(decode(rn,1,C{X+1},null)) cx+1_1"
        for i in 1 .. l_max_cols
        loop
            for j in 1 .. p_pivot.count
            loop
                l_query := l_query ||
                    'max(decode(rn,'||i||','||
                               p_pivot(j)||',null)) ' ||
                                p_pivot(j) || '_' || i || ',';
            end loop;
        end loop;
        -- Now just add in the original query
        l_query := rtrim(l_query,',')||' from ( '||p_query||') group by ';
        -- and then the group by columns...
        for i in 1 .. p_anchor.count
        loop
            l_query := l_query || p_anchor(i) || ',';
        end loop;
        l_query := rtrim(l_query,',');
        -- and return it
        execute immediate 'alter session set cursor_sharing=force';
        open p_cursor for l_query;
        execute immediate 'alter session set cursor_sharing=exact';
    end;
    end;
    /I can see from the error message that it is ignoring the x declaration, I assume it is because it does not recognise the type refcursor from the procedure.
    How do I get it to recognise this?
    Thank you in advance

    Thank you for your help
    This is the version of Oracle I am running, so this may have something to do with that.
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.8.0 - Production
    I found this on Ask Tom (http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:3027089372477)
    Hello, Tom.
    I have one bind variable in a dynamic SQL expression.
    When I open cursor for this sql, it gets me to ora-01008.
    Please consider:
    Connected to:
    Oracle8i Enterprise Edition Release 8.1.7.4.1 - Production
    JServer Release 8.1.7.4.1 - Production
    SQL> declare
      2    type cur is ref cursor;
      3    res cur;
      4  begin
      5    open res for
      6    'select * from (select * from dual where :p = 1) connect by 1 = 1'
      7    using 1;
      8  end;
      9  /
    declare
    ERROR at line 1:
    ORA-01008: not all variables bound
    ORA-06512: at line 5
    SQL> declare
      2    type cur is ref cursor;
      3    res cur;
      4  begin
      5    open res for
      6    'select * from (select * from dual where :p = 1) connect by 1 = 1'
      7    using 1, 2;
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    And if I run the same thing on 10g -- all goes conversely. The first part runs ok, and the second
    part reports "ORA-01006: bind variable does not exist" (as it should be, I think). Remember, there
    is ONE bind variable in sql, not two. Is it a bug in 8i?
    What should we do to avoid this error running the same plsql program code on different Oracle
    versions?
    P.S. Thank you for your invaluable work on this site.
    Followup   June 9, 2005 - 6pm US/Eastern:
    what is the purpose of this query really?
    but it would appear to be a bug in 8i (since it should need but one).  You will have to work that
    via support. I changed the type to tarray to see if the reserved word was causing a problem.
    variable v_refcursor refcursor;
    set autoprint on;
    begin 
         crosstab.pivot (p_max_cols => 4,
                 p_query => 
                   'SELECT job, COUNT (*) cnt, deptno, ' || 
                   '       ROW_NUMBER () OVER ( ' || 
                   '          PARTITION BY job ' || 
                   '          ORDER BY deptno) rn ' || 
                   'FROM   emp ' ||
                   'GROUP BY job, deptno',
                   p_anchor => crosstab.tarray ('JOB'),
                   p_pivot => crosstab.tarray ('DEPTNO', 'CNT'),
                   p_cursor => :v_refcursor);
    end;
    /Was going to use this package as a stored procedure in forms but I not sure it's going to work now.

  • Error while working with ref cursor

    Hi I tried the following but getting the err
    DECLARE
    TYPE ref_nm IS REF CURSOR;
    vref REF_NM;
    vemp emp%rowtype;
    BEGIN
    OPEN vref FOR SELECT ename ,sal FROM EMP;
    LOOP
      FETCH vref INTO vemp;
      EXIT WHEN vref%NOTFOUND;
        DBMS_OUTPUT.PUT_LINE ( vemp.ename ||','||vemp.sal );
    END LOOP;
      CLOSE vref;
    END;Error is
    ORA-06504: PL/SQL: Return types of Result Set variables or query do not match

    Syntactically correct - but a horrible approach performance wise if you only need specific columns.
    The basic problem here is using the wrong tool. A ref cursor. Why? There's no reason in this code for using a ref cursor. Using a standard cursor data type addresses the requirement a lot better.
    As you can define the cursor:
    cursor myCursor is select c1, c2 from tab1;
    You can define an array data type for fetching that cursors data - and thus definition does not need to be touched when you change the cursor itself to include/exclude columns:
    type TMyCursorBuffer is table of myCursor%RowType;
    And finally you can define a bulk collection buffer for bulk processing the output of the cursor:
    myBuffer TMyCursorBuffer;

  • Parallel  piplelined function not parallelizing with ref cursor

    RDBMS 11.2.0.3
    I have a function with the following signature
    function to_file (
      p_source     in  sys_refcursor
    , p_file_name  in  varchar2
    , p_directory  in  varchar2 default 'DD_DUMP'
    return dd_dump_ntt
    pipelined
    parallel_enable ( partition p_source by any )
    authid current_user;The function works in parallel when I use a cursor expression like this
    begin
      for rec in ( select *
                   from table(dd_dump.to_file( cursor(select /*+ parallel(i 4) */ c1||chr(9)||c2 from mytable i), 'f.out' ))
      loop
        dbms_output.put_line(rec.file_name || chr(9) || rec.num_records );
      end loop;
    end;
    f.out_162     276234
    f.out_213     280399
    f.out_230     286834
    f.out_70     289549But when I use a refcursor, it does not run in parallel
    declare
      rc sys_refcursor;
    begin
      open rc for 'select /*+ parallel(i 4) */ c1||chr(9)||c2 from mytable i';
      for rec in ( select *
                   from table(dd_dump.to_file( rc, 'f.out' ))
      loop
        dbms_output.put_line(rec.file_name || chr(9) || rec.num_records );
      end loop;
    end;
    f.out_914     1133016Is this an expected behavior or am I doing something wrong? How can I use the function when the client returns the SQL statement as a character string
    Edited by: Sanjeev Chauhan on Mar 9, 2012 11:54 AM

    Sanjeev Chauhan wrote:
    I am not performing any DML in the pipelined function. If you read the note carefuly it shows parallel_enable works only when you use:
    table(table_function(<font color=red>CURSOR</font>(select...)))and not when you use
    table(table_function(<font color=red>ref-cursor-name</font>))SY.

  • VC 7.0 Oracle stored procedures resultset with ref cursor

    Can VC (we are on NW7 SP13) handle Oracle's datatype ref cursor - which is the standard solution in Oracle to return result sets - as the return value of a stored procedure?
    When testing a data service in the VC story board based upon a simple Oracle function like:
    create or replace package pkg_dev
    is
       type t_cursor is ref cursor;
    end;
    create or replace function vc_stub return pkg_dev.t_cursor
    as
    l_cursor pkg_dev.t_cursor;
    begin
    open l_cursor for select ename from emp;
    return l_cursor;
    end;
    (just as example - I know that could be easily retrieved using the BI JDBC connector framework and accessing tables / views)
    I am always running in the "portal request failed ( Could not execute Stored Procedure)" error - so I am not able to use the "add fields" function to bind the output.
    The defaulttrace contains entries like:
    Text: com.sap.portal.vc.HTMLBRunTime
    [EXCEPTION]
    com.sapportals.connector.execution.ExecutionException: Could not execute stored procedure
    Caused by: java.sql.SQLException: Invalid column type
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    We deployed Oracle's own jdbc-driver for Oracle 10g. Using that driver and a portal jdbc connector framework entry the stored procedures of the Oracle database user mapped to the portal user are discovered and available in the "Find Data Services" section.

    We deployed the drivers as described in the HowTo Papers (e.g.Hwo to Configure UD Connect on the J2EE Server for JDBC Access to External Databases). When deploying the drivers you assign a freely definable name for the set of Oracle's jar-files (eg. oracle_10) as library name. Having deployed the drivers in that way only System Definitions via BI JDBC connector framework were working. With a little help from SAP Support (call lasted more than 2 months till a very capable member of the support team made things working in a very short time) we got the portal jdbc connection with Oracle's jar-files working:
    Here are instructions how to add reference:
    1. Connect to the j2ee using telnet, e.g in the cmd window type:
    telnet <host> <port> + 8, enter uid and pwd of j2ee admin.
    2. jump 0
    3. add deploy
    4. change_ref -m com.sapportals.connectors.database <your lib name>       <your lib name = oracle_10>
    Trying to manually add this reference in visual admin connector container for JDBCFactory failed - reference could be added and saved, but then disappeared (at least in NW7 with SP12). Adding the reference as described above solved the problem.

  • 64bit OraOLEDB failed when calling stored procedure with Ref Cursor

    Hi everyone,
    I used the ADO VB sample provided with the Oracle 10g provider installation.
    But I compiled it in 64bit Visual Studio 2005 and ran on Windows 2003 x64 server.
    The function call "cmd.Execute" when it is trying to call a stored procedure which has an Out Ref Cursor parameter. The exception is
    "PLS-00306: wrong number or types arguments in call"
    I already set the property "PLSQLRSet" to true. But it doesn't help.
    The same code works if I compiled in 32 bit.
    It also works if the stored procedure does not have Ref Cursor parameter.
    I am guessing this is a bug in the 64bit Oracle provider. Anyone can confirm this please? or am I missing anything?
    Wilson

    It appears to work with 11.1.0.6.20 OLEDB provider but only for ExecuteNonQuery, I'm not able to work with Fill, and yes... in x86 works perfectly, but in x64 we are still having the ORA-06550 and PLS-00306 error.
    Our Connection string is as follows:
    "Provider=OraOLEDB.Oracle.1;OLEDB.NET=true;Password=xxxxx;Persist Security Info=True;User ID=exxxxx;Data Source=ECOR; PLSQLRSet=True"
    We are not using ODP.NET.
    Can you confirm that Fill method works with such update?

  • Ora-01001 in procedures with ref cursor parameter after upgrade to 11.1.0.7

    Hi,
    after upgrading from 11.1.0.6.0 to 11.1.0.7.0, I get ora-01001 in procedure calls which have a ref cursor as an out parameter.
    Even a new 11.1.0.7 instance throws this error. My OS is Linux SLES10SP2.
    Please see atched sample code:
    CREATE OR REPLACE PACKAGE test1_pck
    IS
    PROCEDURE run1; -- OK on 11.1.0.6; fails on 11.1.0.7
    PROCEDURE run2; -- OK on 11.1.0.6; OK on 11.1.0.7
    END test1_pck;
    CREATE OR REPLACE PACKAGE BODY test1_pck
    IS
    TYPE t_rec IS RECORD(col dual.dummy%TYPE);
    TYPE t_cur IS REF CURSOR RETURN t_rec;
    PROCEDURE foo1(p_cur OUT t_cur)
    IS
    v_sql VARCHAR2(255) := 'BEGIN OPEN :1 FOR SELECT dummy FROM dual; END;';
    BEGIN
    EXECUTE IMMEDIATE v_sql USING p_cur;
    END foo1;
    PROCEDURE foo2
    IS
    v_sql VARCHAR2(255) := 'BEGIN OPEN :1 FOR SELECT dummy FROM dual; END;';
    v_cur t_cur;
    v_rec t_rec;
    BEGIN
    EXECUTE IMMEDIATE v_sql USING v_cur;
    LOOP
    FETCH v_cur INTO v_rec;
    EXIT WHEN v_cur%NOTFOUND;
    CASE v_rec.col
    WHEN 'X' THEN dbms_output.put_line('success');
    ELSE dbms_output.put_line('error');
    END CASE;
    END LOOP;
    END foo2;
    PROCEDURE run1
    IS
    v_cur t_cur;
    v_rec t_rec;
    BEGIN
    foo1(v_cur);
    LOOP
    FETCH v_cur INTO v_rec;
    EXIT WHEN v_cur%NOTFOUND;
    CASE v_rec.col
    WHEN 'X' THEN dbms_output.put_line('success');
    ELSE dbms_output.put_line('error');
    END CASE;
    END LOOP;
    END run1;
    PROCEDURE run2
    IS
    BEGIN
    foo2;
    END run2;
    END test1_pck;
    Thanks for any hints.
    Regards Frank

    Hi Max,
    the referenced thread discusses a .Net problem. A lot of layers are involved their. My problem is a very basic problem. You get this error even if you run the test in a sql session on the server.
    It would be a great help for me
    a) if someone could test this package on a 11.1.0.7 database
    b) if someone could test this package on a 11.2 database (is it fixed in Release2?)
    c) if someone could give me hints how I could modify the procedure to make it usable for 11.1.0.7
    (I already tried a lot e.g. EXECUTE IMMEDIATE v_sql USING OUT p_cur;
    Thank you
    Frank

  • Need help with Ref Cursor

    Dear All,
    Version : '11.2.0.2.0'
    I have a procedure which gets called from a screen ( on .Net) if use pushes a particular button.
    The procedure takes 15 minutes to complete.
    My requirement is to intimate the front end(.Net) as soon as the procedures gets called successfully without waiting for its completion as it is going to take 15 mins.
    The reason being, the front end will popup a message saying that " The process is going to take long time, A mail will be sent to u after its completion"  once it has been intimated that the procedure has been called successfully.
    Could you please suggest can i return a cursor to front end without even manipulating the data.
    i hope my question is understandable.

    9876564 wrote:
    Dear All,
    Version : '11.2.0.2.0'
    I have a procedure which gets called from a screen ( on .Net) if use pushes a particular button.
    The procedure takes 15 minutes to complete.
    My requirement is to intimate the front end(.Net) as soon as the procedures gets called successfully without waiting for its completion as it is going to take 15 mins.
    The reason being, the front end will popup a message saying that " The process is going to take long time, A mail will be sent to u after its completion"  once it has been intimated that the procedure has been called successfully.
    Could you please suggest can i return a cursor to front end without even manipulating the data.
    i hope my question is understandable.
    It seems to me that your problem is not an Oracle one, but a user interface one.
    I'm assuming the slowness of the procedure is due to how long it's taking to query the data, and if you can't speed that up then, to have the procedure return a ref cursor, the connection between the front end and the procedure must be maintained (the process on Oracle must belong to a session, and the front end needs to be connected to that session).
    So, you can't have Oracle go off and start a seperate process and then pass back the ref cursor when it's finished, because even though you can spawn off seperate processes such as using DBMS_JOB or DBMS_SCHEDULER, they will run in their own 'session' and the calling code won't keep a hold on any of those sessions... they're effectively stand-alone and seperate.
    What you'll have to do is likely get your .net application to spawn off a child process to the main app, that presents the message saying it'll take some time, does the call to Oracle and waits for Oracle to return the resultant ref cursor, which it can then pass back to the main application etc.  Due to .net allowing for multi-tasking, that is where the split processing should take place.

  • Create view With Ref cursor data

    Hi friends,
    I want to create view as follows.
    Example:
    Create or replace v_name
    select job,sal, <funcation>
    from emp;
    Note:- Function not having out parameter.
    Function returning ref cursor values datatype.
    Requirement:-
    I want to create view even function returing ref cursor datatype.
    Please advise how to create view.
    Regards,
    Kishore

    user7284612 wrote:
    Hi friends,
    I want to create view as follows.
    Example:
    Create or replace v_name
    select job,sal, <funcation>
    from emp;
    Note:- Function not having out parameter.
    Function returning ref cursor values datatype.
    Requirement:-
    I want to create view even function returing ref cursor datatype.
    Please advise how to create view.You perhaps are misunderstanding what a ref cursor is. It does not contain data like a table, so cannot be treated as one.
    Take a read of this:
    PL/SQL 101 : Understanding Ref Cursors

  • Stored procedure call with REF CURSOR from JDBC

    How can I call a SP with a REF CURSOR OUT parameter from JDBC?

    This is a breeze.
    CallableStatement oraCall = oraConn.prepareCall("BEGIN PKG_SOMETHING.RETURNS_A_SP(?);END;");
    oraCall.registerOutParameter(1,oracle.jdbc.driver.OracleTypes.CURSOR);
    oraCall.execute();
    ResultSet rsServList = (ResultSet) oraCall.getObject(1);
    ... use ResultSet ...
    rsServList.close();
    oraCall.close();
    slag

  • Why doesn't my EarPods with 3.5 mm work with my iPod touch and my MacBook Pro?

    I have an iPod touch 4g and a Macbook Pro that i bought on October of 2013. I have an EarPod 3.5mm but it won't work witht these items. Should it work? Should it not work? You can hear sounds but they are unclear or you cannot hear them at all if you listen to them.

    If you have another device that uses headphones try it with that. If they don't work get them replaced or buy some good headphones.
    You are welcome.

  • Why does Outlook keep disconnecting with V33.1 ? Works fine in IE 9

    Since I updated to Firefox V33.1 Outlook keeps disconnecting from the server. I have no problem when using Outlook in IE 9

    Are you talking about Windows Live Mail?
    These would be separate programs.
    Can you give more details, please?

  • Dynamic query with ref cursors

    please help me out there.
    can you give an example of how to construct a procedure using ref cursors.
    say if I had an employee table.
    employee table
    first name
    last name
    position
    dept
    I would have three input parameters, last name, position, dept. Sometimes only one parameters would be passed. Sometimes only two or sometimes all three.
    How can I construct the procedure being that the parameters will be dynamic
    thanks.

    Don't worry user484105 I don't do kicking, sarcasm and bad humour are other matters though.
    Yes you can use sys_refcursor, in fact all the tests that Todd and I have supplied, have done just that. Do you have a development database to work in?
    if so I would recommend
    1. Run demobld.sql if you don't already have emp table.
    2. Copy my second post in your other thread.
    3. Edit out all the sqlplus output and the first four columns.
    4. If any of this puzzles you see if you can find the answer in the SQL Reference, PL/SQL Guide or SQL*Plus manuals
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/toc.htm
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14357/toc.htm
    5. If you can't find the answer post what you have and the error here.
    6. It is probably best if you use sqlplus for this.
    You will learn a lot if you can do this.

  • Performance problem with sproc and out parameter ref cursor

    Hi
    I have sproc with Ref Cursor as an OUT parameter.
    It is extremely slow looping over the ResultSet (does it record by record in the fetch).
    so I have added setPrefetchRowCount(100) and setPrefetchMemorySize(6000)
    pseudo code below:
    string sqlSmt = "BEGIN get_tick_data( :v1 , :v2); END;";
    Statement* s = connection->createStatement(sqlStmt);
    s->setString(1, i1);
    // cursor ( f1 , f2, f3 , f4 , i1 ) f for float type and i for interger value.
    // 5 columns as part of cursor with 4 columns are having float value and
    // 1 column is having int value assuming 40 bytes for one rec.
    s->setPrefetchRowCount (100);
    s->PrefetchMemorySize(6000);
    s->registerOutParam(2,OCCICURSOR);
    s->execute();
    ResultSet* rs = s->getCursor(2);
    while (rs->next()) {
    // do, and do v slowly!
    }

    Hi,
    I have the same problem. It seems, when retrieving cursor, that "setPrefetchRowCount" is not taking into account by OCCI. If you have a SQL statement like "SELECT STR1, STR2, STR3 FROM TABLE1" that works fine but if your SQL statement is a call to a stored procedure returning a cursor each row fetching need a roudtrip.
    To avoid this problem you need to use the method "setDataBuffer" from the object "ResultSet" for each column of your cursor. It's easy to use with INT type and STRING type, a lit bit more complex with DATE type. But until now, I'm not able to do the same thing with REF type.
    Below a sample with STRING TYPE (It's assuming that the cursor return only one column of STRING type):
    try
      l_Statement = m_Connection->createStatement("BEGIN :1 := PACKAGE1.GetCursor1(:2); END;");
      l_Statement->registerOutParam(1, oracle::occi::OCCINUMBER, sizeof(l_CodeErreur));
      l_Statement->registerOutParam(2, oracle::occi::OCCICURSOR);
      l_Statement->executeQuery();
      l_CodeErreur = l_Statement->getNumber(1);
      if ((int) l_CodeErreur     == 0)
        char                         l_ArrayName[5][256];
        ub2                          l_ArrayNameSize[5];
        l_ResultSet  = l_Statement->getCursor(2);
        l_ResultSet->setDataBuffer(1, l_ArrayName,   OCCI_SQLT_STR, sizeof(l_ArrayName[0]),   l_ArrayNameSize,   NULL, NULL);
        while (l_ResultSet->next(5))
          for (int i = 0; i < l_ResultSet->getNumArrayRows(); i++)
            l_Name = CString(l_ArrayName);
    l_Statement->closeResultSet(l_ResultSet);
    m_Connection->terminateStatement(l_Statement);
    catch (SQLException &p_SQLException)
    I hope that sample help you.
    Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Move tooltip with the cursor

    Hi All,
    I developed an appplication in flex.In my application i placed an image and set the tooltip property.I also changed the image Hand cursor property to true.Here i need that,the tooltip must be move withe hand cursor.Please let me know the solution.
    Thanking You.

    I would try this (as I'm not sure how the Flex tooltip works exactly) - when you show the tip add an enterFrame eventListener to it and update its position based on the mouse. When you remove the tip, remove the listener.

Maybe you are looking for