~QOCIResult: unable to free statement handle

Good morning
I have a problem with an application. First of all I use oracle db 10 and qt 4.6 with c++ and I have written this code:
void DBConnector::releaseConnection(const dbConnection& dbc)
        QMutexLocker locker(&mt_connections);
        QString conn_id = dbc.getId();    //here I obtain my connection name
        cout << "Release Connection: " << qPrintable(conn_id) << endl;
        QSqlDatabase myDB = QSqlDatabase::database( conn_id );
        myDB.close();
        QSqlDatabase::removeDatabase( conn_id );
}The code compiles and works but it returns a warning: ~QOCIResult: unable to free statement handle
So I've lost two days to understand where the problem is but I wasn't able to find a solution. I've also opened the qsql_oci.cpp file and I've found this:
QOCIResult::~QOCIResult()
    if (d->sql) {
        int r = OCIHandleFree(d->sql, OCI_HTYPE_STMT);
        if (r != 0)
            qWarning("~QOCIResult: unable to free statement handle");
    delete d;
}I think the problem is in the OCIHandleFree method. Do you know how to solve it? Is this a bug between qt and oracle?
Thanks

If there's a problem between a 3rd party product and Oracle,you better consult the 3rd party (because the 3rd party vendor prepares the API).
Werner

Similar Messages

  • Err 62007: SQL Error: 99999 ORA-24338: Statement Handle not Executed

    Hi,
    I am facing a problem while adding a new parameter n my JSP Report JDBC query based on a ref-cursor from a stored procedure define in a package in database.
    No problem at database level, I have added the new parameter in package specification and Package body for that procedure and compile my package, it complies without any error and warning.
    but when I open the report and add parameter in the report JDBC query window, then it is generating a error message,
    "Err 62007: SQL Error: 99999 ORA-24338: Statement Handle not Executed "
    and I am unable to add the new parameter in report.
    e.g.
    Actual which was working is:
    My-package.My-procedure(:P1,:P2,:P3 ,:P4,:P5,:P6,:P7)
    I want to do this:
    My-package.My-procedure(:P1,:P2,:P3 ,:P4,:P5,:P6,:P7,:P8)
    but unable to do due to this error message:
    ("Err 62007: SQL Error: 99999 ORA-24338: Statement Handle not Executed ")
    Reports Builder 10g:
    Database 10g:
    Operating system windows XP:
    using JDBC Query base on ref-cursor coming from the stored procedure define in the Package.
    Regards,
    Khan

    and compile my package, it complies without any error and warning.That doesn't mean anything in this case. You are getting a runtime error, not a compilation error. The error is coming when you execute your procedure.
    Did you test your modified procedure in sqlplus or SQL Developer?

  • IFS-30805 Unable To Free Class -- huh??

    So I'm finally fed up with the snafus and bogusity and decide to delete my content type (an extension of DOCUMENT) and start over. Using the Viewer, I delete all the uploaded files of this type and the test folder that contained the uploaded files. Nobody else is using this content type: it is now totally unused.
    So from the 9iFS Manager (Mangler?) I highlight the content type and click Object->Delete.
    After a short wait I get a dialog box: "The ClassObject has instances...Do you want to delete instances?" Well, I don't agree with the statement, as all the instances are gone, but sure, I'll go along with it, so I click OK.
    After another wait I get an "Are you sure..." dialog, and I answer OK. (I'm VERY sure).
    Finally after yet another wait I get dialog containing an "IFS-30805 Unable to free class (instances still exist)".
    This is, to use as polite a term as I can, HORSEPUCKY. What the heck is going on here? Why can't I delete this content type? Where do these (alleged) instances exist that are preventing the deletion?
    All help, speculation, advice and incantations greatly appreciated.
    Thank you,
    Jeff Rininger

    Jeff,
    You are not alone! Things to check are that your extended class bean does not have issues with naming. I had the same problem and it was due to me naming the class AB but when compiled on NT 2000 it was compiled as ab.class
    To resolve the issue though run this to find the instances as they are still there!
    SELECT id, name
    FROM odm_publicobject
    WHERE classid IN (
    SELECT id FROM odm_classobject
    WHERE uniquename IN ('EXTENDED CLASS NAME'));
    Use the ID's from this to put in the following JAVA to delete (Substitute ID:
    IfsFileSystem ifs = new IfsFileSystem(ifsSession);
    Folder f = (Folder)ifs.findPublicObjectById(new Long(ID));
    ifs.delete(f, true);
    ifsSession.disconnect();
    That should help you out.
    Regards
    Chris Mayhew

  • Free Stmt Handle NOT release Memory allocated inDefineByPos[LongRaw]

    My Question is : Why Free Stmt Handle does not release the memory OCI allocated during OCIDefineByPos for data type "Long Raw"
    Please notice the Bold Fonts in the dtrace logging. Ptr is the pointer returned by malloc. Size is the memory size allocated.
    I use OCI to fetch records, each round I will fetch 1000 records. I found memory increase round by round. So I use dtrace to probe the memory malloc/free. At the end of each round, I will free the handle of SQL Statement. According the documentation, all the sub handles belongs to stmt handle should be free also. But I noticed that memory allocated during DefinebyPos for LongRaw did not get released.
    1. The SQL Send to DB each round is the same.
    2. I do the "Define" each round. So It's actually a "RE-Define" each round.
    The length of Long Raw is 512K. Here's the dtrace result when I call the OCIDefineByPos. There's a 2MB memory allocated, I don't know the reason.
    CPU ID FUNCTION:NAME
    3 45971 free:entry Ptr=0x247652d0 Size=0 TS=1568035638893113 FreeTime=2008 Jul 20 23:26:09
    libc.so.1`free
    libclntsh.so.10.1`sktsfFree+0x18
    libclntsh.so.10.1`kpummfpg+0xb6
    libclntsh.so.10.1`kghfrempty+0x17c
    libclntsh.so.10.1`kghgex+0x13c
    libclntsh.so.10.1`kghfnd+0x28a
    libclntsh.so.10.1`kghalo+0x669
    libclntsh.so.10.1`kghgex+0x1e6
    libclntsh.so.10.1`kghfnd+0x28a
    libclntsh.so.10.1`kghalo+0x669
    libclntsh.so.10.1`kghgex+0x1e6
    libclntsh.so.10.1`kghfnd+0x28a
    libclntsh.so.10.1`kghalo+0x669
    libclntsh.so.10.1`kpuhhalo+0x1fd
    libclntsh.so.10.1`kpuex_reallocTempBufOnly+0x5f
    libclntsh.so.10.1`kpuertb_reallocTempBuf+0x36
    libclntsh.so.10.1`kpudefn+0x2d1
    libclntsh.so.10.1`kpudfn+0x39e
    libclntsh.so.10.1`OCIDefineByPos+0x38
    scrubber`_ZN29clsDatabasePhysicalHostOracle6DefineEN7voyager15eBayTypeDefEnumEiPhiPs11EnumCharSet+0x17f
    3 45966 malloc:return Ptr=0x252ad100 Size=524356 TS=1568035638916654 AllocTime=2008 Jul 20 23:26:09
    libc.so.1`malloc+0x49
    libclntsh.so.10.1`kpummapg+0xcc
    libclntsh.so.10.1`kghgex+0x1aa
    libclntsh.so.10.1`kghfnd+0x28a
    libclntsh.so.10.1`kghalo+0x669
    libclntsh.so.10.1`kghgex+0x1e6
    libclntsh.so.10.1`kghfnd+0x28a
    libclntsh.so.10.1`kghalo+0x669
    libclntsh.so.10.1`kghgex+0x1e6
    libclntsh.so.10.1`kghfnd+0x28a
    libclntsh.so.10.1`kghalo+0x669
    libclntsh.so.10.1`kpuhhalo+0x1fd
    libclntsh.so.10.1`kpuex_reallocTempBufOnly+0x5f
    libclntsh.so.10.1`kpuertb_reallocTempBuf+0x36
    libclntsh.so.10.1`kpudefn+0x2d1
    libclntsh.so.10.1`kpudfn+0x39e
    libclntsh.so.10.1`OCIDefineByPos+0x38
    scrubber`_ZN29clsDatabasePhysicalHostOracle6DefineEN7voyager15eBayTypeDefEnumEiPhiPs11EnumCharSet+0x17f
    scrubber`_ZN18clsDatabaseManager6DefineEN7voyager15eBayTypeDefEnumEiPhiPs+0x13c
    scrubber`_ZN17clsDatabaseOracle13DefineLongRawEiPhiPs+0x2f
    3 45971 free:entry Ptr=0x2476ab30 Size=0 TS=1568035639035363 FreeTime=2008 Jul 20 23:26:09
    libc.so.1`free
    libclntsh.so.10.1`sktsfFree+0x18
    libclntsh.so.10.1`kpummfpg+0xb6
    libclntsh.so.10.1`kghfrempty+0x17c
    libclntsh.so.10.1`kghgex+0x13c
    libclntsh.so.10.1`kghfnd+0x28a
    libclntsh.so.10.1`kghalo+0x669
    libclntsh.so.10.1`kghgex+0x1e6
    libclntsh.so.10.1`kghfnd+0x28a
    libclntsh.so.10.1`kghalo+0x669
    libclntsh.so.10.1`kghgex+0x1e6
    libclntsh.so.10.1`kghfnd+0x28a
    libclntsh.so.10.1`kghalo+0x669
    libclntsh.so.10.1`kpuhhalo+0x1fd
    libclntsh.so.10.1`kpuertb_reallocTempBuf+0x8f
    libclntsh.so.10.1`kpudefn+0x2d1
    libclntsh.so.10.1`kpudfn+0x39e
    libclntsh.so.10.1`OCIDefineByPos+0x38
    scrubber`_ZN29clsDatabasePhysicalHostOracle6DefineEN7voyager15eBayTypeDefEnumEiPhiPs11EnumCharSet+0x17f
    scrubber`_ZN18clsDatabaseManager6DefineEN7voyager15eBayTypeDefEnumEiPhiPs+0x13c
    3 45966 malloc:return Ptr=0x2532d150 Size=2097220 TS=1568035639040090 AllocTime=2008 Jul 20 23:26:09
    libc.so.1`malloc+0x49
    libclntsh.so.10.1`kpummapg+0xcc
    libclntsh.so.10.1`kghgex+0x1aa
    libclntsh.so.10.1`kghfnd+0x28a
    libclntsh.so.10.1`kghalo+0x669
    libclntsh.so.10.1`kghgex+0x1e6
    libclntsh.so.10.1`kghfnd+0x28a
    libclntsh.so.10.1`kghalo+0x669
    libclntsh.so.10.1`kghgex+0x1e6
    libclntsh.so.10.1`kghfnd+0x28a
    libclntsh.so.10.1`kghalo+0x669
    libclntsh.so.10.1`kpuhhalo+0x1fd
    libclntsh.so.10.1`kpuertb_reallocTempBuf+0x8f
    libclntsh.so.10.1`kpudefn+0x2d1
    libclntsh.so.10.1`kpudfn+0x39e
    libclntsh.so.10.1`OCIDefineByPos+0x38
    scrubber`_ZN29clsDatabasePhysicalHostOracle6DefineEN7voyager15eBayTypeDefEnumEiPhiPs11EnumCharSet+0x17f
    scrubber`_ZN18clsDatabaseManager6DefineEN7voyager15eBayTypeDefEnumEiPhiPs+0x13c
    scrubber`_ZN17clsDatabaseOracle13DefineLongRawEiPhiPs+0x2f
    scrubber`_ZN5dblib11DbExtractor18DefineLongRawFieldEiPhiPs+0x2b

    Assumption : You are using OCIHandleFree((dvoid*)DBctx->stmthp,(ub4)OCI_HTYPE_STMT);
    There are two scenarios here the LONG Raw mapping and release of memory.
    Unlike the other data types LONG Raw memory mapping is different since the data type requires more memory chunks.
    45971 free:entry Ptr=0x2476ab30 Size=0 TS=1568035639035363 FreeTime=2008 Jul 20 23:26:09
    libc.so.1`free
    Since from the above statement it clear that free is called . Hence there may be chance in other area of the code I suspect the memory leak is (Like native storage).
    Moreover the standard OS behavior is that it will not release the Heap/Stack until the process is complete even the free() is called by the process. This is for performance on memory management.Having said that it should not increase the memory drastically when not required.

  • New inst: HP-UX: db2icrt fails: CLP frontend unable to get request handle

    We are migrating our installations from the beautiful AIX to ... HP-UX.  I am told I will learn to love it, but probably not until they update df to at least 1988 levels. 
    This is the pilot install.  We have never seen this work before (and maybe no-one has...?)
    sapinst runs correctly up to the "Create database instance" phase.  At that point it dies with the following:
    FUNCTION: DB2 UDB, command line process, clp_start_bp, probe:3
    MESSAGE  : CLP frontend unable to get REQUEST handle
    DATA #1: Hexdump etc.
    DBI1281E: The database manager configuration file could not be read initialized.
    No further useful information is provided.
    In db2<sid> I have a bunch of dot files (.profile and the like) and the db2_software directory containing the database installation.
    During the create database instance phase, I can see that directory sqllib is created, but it is deleted when the phase fails.
    There is no litter of any kind in the /db2/<SID> directories, - nothing has been done at all.
    I have done the following: <<imagine nice bullets below - they dont seem to be available here>>
    checked that the permissions on /tmp and the installation direcctory (redirected by setenv  TEMP  /usr/sap/install) are 777: they are;
    checked the OS parameters with db2osconf - they are good
    checked the host name resolution with a perl script - gethostbyname and gethostbyaddr agree.
    the ip address, simple hostname and FQDN are on a line in the hosts file
    there is no litter from previous installations - this is a clean machine
    I could not find any reference to required environment variables (such as LD_LIBRARY_PATH) in the install guide or the install note - so I have not set any.
    I have been hacking away at this for days.  I have put in a call to SAP, who will get back to me after dark (of course...)
    This seems to be a massively popular problem, and the helpful error message ("Sorry, Sport, just can't bring myself to do it") seems to have people jumping from tall buildings and in front of busses all over Google-world.  Furthermore there also seems to be a near-infinite number of possible causes and none of them seem to apply here.
    H-PUX version is 11.31.  DB2 is 9V5 patch 4.  sapinst is latest available.  Weekend is fading fast...
    Edited by: Russell Day on Mar 5, 2010 7:46 AM

    >
    Paul Power wrote:
    > Hi Russell,
    >
    > Apologies if some of this has been already tried but please check the following points:
    >
    > Make sure the machine name is listed in its hosts file.
    >
    > Make sure to log on directly to root. ie: do not su to root from another without '-'        
    >
    > Make sure there is no instance created already (find / -name sqllib) for that user 
    >
    > Using ps -aef and ipc -a, no old db2 ressources should be displayed for db2 instance owner. If there are any, kill/remove it  
    >
    > You should make sure, that LIBPATH and LD_LIBRARY_PATH of root and db2 instance owner does not point to an path of another db2 version
    >
    > Regards,
    > Paul
    No need to apologise for assisting, Paul, but I have dealt with most of these.
    The host file contains the unqualified and fully qualified hostnames, on the same line, unqualified first.
    I am logging in as root (because there were no other users, and I'm old school, from when everyone logged on as root to do everything.
    There is no instance, and in fact there is no sqllib except when the "create database instance" step is running.
    The only detectable db2 process running is db2fcmd
    I have not been able to find any instructions regarding LD_LIBRARY_PATH and LIBPATH for HP-UX.  They are not mentioned in the installation guide at all.  I cannot find it in any of the installation notes.   I presume sapinst is setting them itself before they are needed.  Neither are set in the enviroment of db2<sid> or <sid>adm.  I have gnawed my fingernails to the elbow over this one, but I cannot see any indication that either should be set for HP-UX.  Anyway, they are definitely not set anywhere, to anything.  This was a clean machine before I started chopping it up to do this install.
    I figure it must be complicated - I have been trying to get an answer for 10 days already.  I will absolutely hate myself when it turns out to be something obvious, documented in 10 places, mostly in bold italics.  I shoulda taken my dads advice and been a riverboat gambler or a piano player in a cathouse - its a lot less complicated,

  • Session pooling and statement handles

    Hi there,
    I have a large multi-threaded application (perhaps >100 threads). Each thread is continuously processing events (very high volumes) which involves some manipulation and some database operations (from a fixed set of possible operations).
    I am using session pooling but what I want to know is, Should I:
    (a) Prepare my fixed set of statement handles up front at program start-up when I'm creating the session pool and then reuse the statement handles in each event processing thread (also, is this thread safe ? even if it is, all threads would be contending on the same statement handles)
    or
    (b) Prepare the statement handle for each event which presumably will exploit the statement cache on the session pool. This would also mean not having statement handles shared between threads thus removing any thread contention issues.
    I think (b) is the option for me, but does anyone have any thoughts ?

    With a), one would think it's OK, but I would hate to find out that it's not thread safe by accident.
    But anyway, with b) the cost of allocating private statement handles in each thread seems very low. The memory required for the statement handle plus its bind and define handles could very well be below 8k per statement. If you've got say, 5 statements * 100 threads, you're only looking at around 4MB overall.
    Finally, you might want to make sure that the session pool statement cache is working by checking the values for 'executions' and 'parse_calls' in V$SQL for your statements.

  • Unable to Free Transform

    Hi all
    I have lost my free transform handles on all objects. I can
    transform by typing in values but when selecting Free Transform
    after right clicking (or using drop down menu), nothing happens. I
    had recently installed a few extensions, namely Toon Titan, Nested
    Timeline and IK Motion. I have uninstalled IK Motion and disabled
    the other two but to no avail. can anyone help with this? Thanks!
    Brent

    wow - are you kidding? that is amazing! so remove the tool
    from the toolbox and it renders it
    useless throughout the IDE? Added this to my list - surely it
    is a bug.
    oh and yer very welcome :)
    catsqueezer wrote:
    > Okay, figured it out mine own self. Seems if you remove
    the Free Transform
    > button from the Tool Bar, it removes the function all
    together so you can't
    > even access it through the menus. How stupid is that. I
    had used that slot in
    > the toolbar for the IK Motion picker as I never click on
    the Free Transform
    > button in the tool bar.
    >
    > If the Flash Dev team is listening... you may want to
    revisit that. Thanks
    > Chris for your help and i appreciate all the resources
    you make available on
    > character animation in Flash specifically. cheers
    >

  • "Error in TTCmd::Prepare() while allocating statement handle")

    "Error in TTCmd::Prepare() while allocating statement handle")
    How does this kind of error come out? What is the reason? The posibilities are what?
    Hoping to receive your answers/
    Thanks!
    Edited by: user10789526 on 2009-8-20 上午12:13

    Privileges acquired via ROLE do NOT apply within named PL/SQL procedures.
    Explicit GRANT is required to resolve this issue.

  • Unable to get Window Handle for the 'AxCrystalActivXViewer' control.

    Hi,
    I have Operating System : Windows 7 and Application developed in VS 2005 and I am using Crystal Report XI licenced version.
    But when I am trying to use TTX(Field Defination) based reports it gives me "Unable to get Window Handle for the 'AxCrystalActivXViewer' control. Windowless ActivX Controls are not supported."
    Please provide me solution for this ASAP as I am stucked on this from long lomg time.
    -Regards
    Swapnil

    Appears you are installing an upgrade version.
    Use these links:
    http://downloads.businessobjects.com/akdlm/crystalreports/crxir2_sp4_full_bld_0-20008684.exe
    http://downloads.businessobjects.com/akdlm/crystalreports/CRYSTALREPORTS06_0-20008684.EXE

  • Java.sql.SQLException: statement handle not executed

    hello,
    i am calling a stored procedure and its returns a REF CURSOR and i am getting intermittent exceptions below,
    org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
    xxxx_pkg(?,?)}]; SQL state [99999]; error code [17144]; statement handle not executed; nested exception is java.sql.SQLException: statement handle not executed
    and
    org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
    xxxx_pkg(?,?,?)}]; SQL state [99999]; error code [17009]; Closed Statement; nested exception is java.sql.SQLException: Closed Statement
    any clue what could be the issue,
    Regards
    GG

    its pretty simple have a java class calling hibernateTemplate's findByNamedQueryAndNamedParam method by passing the procedure name and binding parameters/values, and here is the stack
    org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
    xxx_pkg(?,?)}]; SQL state [99999]; error code [17144]; statement handle not executed; nested exception is java.sql.SQLException: statement handle not executed
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
    at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
    at org.springframework.orm.hibernate3.HibernateTemplate.findByNamedQueryAndNamedParam(HibernateTemplate.java:1006)
    Caused by: java.sql.SQLException: statement handle not executed
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:403)
    at oracle.jdbc.driver.T4CStatement.doDescribe(T4CStatement.java:701)
    at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3355)
    at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:2009)
    at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:494)
    at org.hibernate.type.StringType.get(StringType.java:18)
    at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:163)
    at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:154)
    at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
    at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2091)
    at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1380)
    at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1308)
    at org.hibernate.loader.Loader.getRow(Loader.java:1206)
    at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
    at org.hibernate.loader.Loader.doQuery(Loader.java:701)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
    at org.hibernate.loader.Loader.doList(Loader.java:2217)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2108)
    at org.hibernate.loader.Loader.list(Loader.java:2103)
    at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289)
    at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1696)
    at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
    at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152)
    at org.springframework.orm.hibernate3.HibernateTemplate$34.doInHibernate(HibernateTemplate.java:1015)
    at org.springframework.orm.hibernate3.HibernateTemplate$34.doInHibernate(HibernateTemplate.java:1)
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)

  • ORA-24338: statement handle not executed

    Hi,
    My front end programming platform is .NET. Oracle DataBase is 10g.
    I have written this package:
    CREATE OR REPLACE package body USER_NAME.PACKAGE_TEST1 as
    procedure getname(id1 number,tb_cursor out md_cursor)
    as
    begin
    open tb_cursor for select name from testtable1 where id1=id;
    close tb_cursor;
    end getname;
    end package_test1;In the front end i am using DataReader to fetch data.
    But while Executing reader an error occurs that is "ORA-24338: statement handle not executed".
    But when i remove "close tb_cursor" programm runs successfully.
    What is the reason for that error ?

    user12222356 wrote:
    Tubby wrote:
    A ref cursor is nothing more than a pointer to a statement (query).
    So no, you do not want to make 1000 procedure calls. You want your ref cursor to be opened for a query that contains 1000 rows. The client calls your procedure ONE TIME and processes the entirety of the ref cursor (1000 rows), then closes the cursor that your procedure so graciously opened for them.But according to .NET(my front end platform) documentation DataReader fetches data from database row by row .each row at a time.That means when the procedure was first called REF CURSOR was opened and was open till all data are fetched.Means at the begining itself query was executed and all data was fetched and stored temporarily in the database, and then DataReader fetched those data row by row..i.e., after first call to procedure only fetching of data is done. NO opening,NO closing ,NO select query execution (that was referenced by REf CURSOR). And when all rows are fetched that open cursor is closed . Is my concept right here ?YOU opened the cursor (in your procedure).
    The select query execution IS the ref cursor being processed by your DataReader.
    The data is not temporarily stored in the database ... it persists there (unless someone deletes it) ... so that statement wasn't really correct. DataReader would just be reading the rows from the database (via the ref cursor)
    I would assume DataReader will close the cursor for you, but i really don't know ... you'd have to ask a .not person about that.

  • ORA-24338: statement handle not executed   -- error in returning refcursor

    My packaged procedure has Ref cursor as out variable.
    Calling the packaged procedure from Cognos 8. while trying to access the packaged procedure , getting the below error.
    ORA-24338: statement handle not executed
    Please provide a solution...

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    Confirm that the procedure works properly when called from sql*plus.
    For example here is some code that tests a package procedure I have in the SCOTT schema
    SET SERVEROUTPUT ON SIZE 1000000
    DECLARE
      l_cursor  test_refcursor_pkg.my_ref_cursor;
      l_ename   emp.ename%TYPE;
      l_empno   emp.empno%TYPE;
    BEGIN
      test_refcursor_pkg.test_proc (l_cursor);
      LOOP
        FETCH l_cursor
        INTO  l_empno, l_ename;
        EXIT WHEN l_cursor%NOTFOUND;
        DBMS_OUTPUT.PUT_LINE(l_ename || ' | ' || l_empno);
      END LOOP;
      CLOSE l_cursor;
    END;
    /

  • Unable to free space on hard drive

    I have been unable to free up space on my startup disk. I deleted several GB of movies and they did not go to the trash bin so I assumed they were deleted. However, when I monitored the storage on the System Information panel, before and after deleting this movies I observed negligible change in storage space. 
    Some other info:
    1. External Hard Drive was used with time machine before but time machine turned off and external hard drive removed
    2. trash emptied
    3. Restarted computer
    4. Drive verified in disk utility

    Freeing Up Space on The Hard Drive
      1. See Lion/Mountain Lion/Mavericks' Storage Display.
      2. You can remove data from your Home folder except for the /Home/Library/ folder.
      3. Visit The XLab FAQs and read the FAQ on freeing up space on your hard drive.
      4. Also see Freeing space on your Mac OS X startup disk.
      5. See Where did my Disk Space go?.
      6. See The Storage Display.
    You must Empty the Trash in order to recover the space they occupied on the hard drive.
    You should consider replacing the drive with a larger one. Check out OWC for drives, tutorials, and toolkits.
    Try using OmniDiskSweeper 1.8 or GrandPerspective to search your drive for large files and where they are located.

  • Oracle Error - statement handle not executed state

    Hello,
    A BCA scheduled job has failed and returned with the following error. Does anyone have an idea to fix this error.
    Connection or SQL sentence error: (DA0005): [Exception: DBD, ORA-24338: statement handle not executed State: N/A] The following data providers have not been successfully refreshed
    Thanks
    -Gopi

    Please provide more information on what Crystal Reports or Business Objects product you are using. The more details you can provide, the quicker the resolution...
    Ludek

  • Statement handle not executed error

    Hi,
    I have a package which have a statement as follows.
    OPEN p_out_provider_w_POSAccess FOR
                   SELECT DISTINCT claim.cert_no, claim.rec_code,
                                   prov.ghi_prov_num, prov.irs_number tax_id,
                                   prov.full_name, prov.lastname, prov.firstname
                              FROM hmo.hmo_medical_claim claim,
                                   ipd2.i_provider prov,
                                   ipd2.i_provider_top pt,
                                   ops_arw.phr_top top,
                                   ops_arw.provider_pin pin
                             WHERE claim.cert_no =hmo_conv_num_to_letter (p_in_cert_no)
                               AND claim.rec_code = p_in_rec_code
                               AND claim.ghi_prov_num = prov.ghi_prov_num
                               AND claim.ghi_prov_num = pt.ghi_prov_num
                               AND claim.ghi_prov_num = pin.ghi_prov_num
                               AND pt.top_code = top.top_code
                          ORDER BY prov.lastname, prov.firstname;                                
                                    when I execute the package ,I get
    dweb1:ops_arw> PRINT p_out_provider_w_POSAccess
    ERROR:
    ORA-24338: statement handle not executed
    SP2-0625: Error printing variable "p_out_provider_w_POSAccess"Thanks

    user11253970 wrote:
    No I am not closing it.Just now I noticed that when I input values which are in Database it returns the result without any failure.But when I try to input values which are not in database ,Instead of returning zero rows it gives the error message.Then your SP logic branches in such way that values which are not in the database bypass open cursor statement:
    SQL> create or replace
      2    procedure p1(p_cur in out sys_refcursor,p_ind number)
      3    is
      4    begin
      5        if p_ind = 1
      6          then
      7            open p_cur for select ename from emp where deptno = 10;
      8        end if;
      9  end;
    10  /
    Procedure created.
    SQL> exec p1(:p_cur,1)
    PL/SQL procedure successfully completed.
    SQL> print p_cur
    ENAME
    CLARK
    KING
    MILLER
    SQL> exec p1(:p_cur,0)
    PL/SQL procedure successfully completed.
    SQL> print p_cur
    ERROR:
    ORA-24338: statement handle not executed
    SP2-0625: Error printing variable "p_cur"
    SQL> SY.

Maybe you are looking for