Maximum size of a stored procedure

Hi all,
I am having a stored procedure with size specifications mentioned below.
SOURCE_SIZE PARSED_SIZE CODE_SIZE ERROR_SIZE
163624 1292 150380 0
Is this exeeding pl/sal standard size?
What is the optimal size of a procedure?
Does the above given size include the size of procedures called from it?
ALso, in what unit is the above size given?
Now I am not able to debug the Sp.
Please Help
Thanks in Advance
Simon

Standard size? There is no such thing.
Optimum size? There is no such thing.
No.
Perhaps the reason you can't debug the proc relates to the error message and version that you didn't mention. Or perhaps it is what you are doing to try to debug it which you didn't mention.
I tried to look into my crystal ball to see your code but it is a bit fogged up right now.

Similar Messages

  • Command for "How to find Cursor Size" in Oracle Stored Procedure"

    Hi
    Can u tell me....
    How to find Cursor Size" in Oracle Stored Procedure........
    I want command for that........

    why don't you try select count(*) from your_table;That requires running the same query twice - or rather running two different queries twice. Besides it still doesn't guarantee anything, because Oracle's read consistency model only applies at the statement level (unless you're running in a serialized transaction).
    This is such a common requirement - users are wont to say "well Google does it" - it seems bizarre that Oracle cannot do it. The truth is that that Google cheats. Firstly it guesses the number on the basis of information in its indexes and refines the estimate as pages are returned. Secondly, Google is under no onus to kepp all its data and indexes synchronized - two simultaneous and identical queries which touch different Google servers can return different results. Oracle Text works the same way, which is why we can get a count with CTX_QUERY.COUNT_HITS in estimate mode.
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com
    .

  • Maximum size of record store on PalmOS?

    Good days,
    I am using MIDP which run on the Palm device. I have some problems regarding the RMS on MIDP. I hope someone who has valuable ideas can share this with me.
    How many total records (or maximum size) that Palm OS can be held? Or what is the maximum records or maximum size can be stored on Palm OS?
    I have read one book state that "On a Palm device, each record can be no more than 64K in length because of restrictions imposed by the Palm OS." So i need to know how many records that i can store on Palm OS to prevent some of information is lost.
    All your help is very appreciated and thank in advance ...
    best regards
    SL

    Hi,
    There is no restrictions on palm. In past PalmOS had
    restrictions because of its heap size and non
    relocatable chunk. But for the Palm OS 3.0 and after
    Palm OS 3.0 can support large memory.
    For more information of palm goto : PalmOS.com
    ThanksIf that's true, then why on a brand new treo 180, with palmos 3.5.2H4.0 and 15 of 16 megs free, am I unable to either import or "file link" no more than 10376 records of a csv file? I have two csv files of contacts, (a customer file and a vendor file) one is about 4 megs in 28k records, and the other is about 2.6 megs in about 16k records. In both cases the palm desktop (4.0.1) refuses to proceed past the 10376th record, and gives an error saying "maximum allowed records reached, must delete or archive some..."

  • Stored procedure execution problem

    hi guys
    I am having problems running a stored procedure where i am using two input parameters
    my stored procedure is as follows
    ALTER procedure [dbo].[enterdhbnameDhbService]
    @dhb_service char, @dhbname char
    as
    SELECT dbo.DHBMappingTable.[DHB Name], dbo.Agency.DHB_service, dbo.PurchaseUnitMappingTable.PU,
    SUM(dbo.[NMDS Data for IDF Report].[Number of caseweighted discharges]) AS Expr1, dbo.AdmissionMappingTable.Admission
    FROM dbo.DomicileCodes INNER JOIN
    dbo.[NMDS Data for IDF Report] ON dbo.DomicileCodes.[Domicile code] = dbo.[NMDS Data for IDF Report].[Domicile Code] INNER JOIN
    dbo.PurchaseUnitMappingTable ON dbo.[NMDS Data for IDF Report].[Purchase Unit] = dbo.PurchaseUnitMappingTable.PU INNER JOIN
    dbo.AdmissionMappingTable ON
    dbo.[NMDS Data for IDF Report].[Admission Type Description] = dbo.AdmissionMappingTable.[Admission Type Description] INNER JOIN
    dbo.Agency ON dbo.[NMDS Data for IDF Report].[Agency Name] = dbo.Agency.Agengy INNER JOIN
    dbo.DHBMappingTable ON dbo.DomicileCodes.[DHB area] = dbo.DHBMappingTable.[DHB Code]
    WHERE (dbo.[NMDS Data for IDF Report].[Financial Year] = '20062007')
    GROUP BY dbo.DHBMappingTable.[DHB Name], dbo.Agency.DHB_service, dbo.PurchaseUnitMappingTable.PU, dbo.AdmissionMappingTable.Admission
    HAVING (dbo.Agency.DHB_service = @dhb_service) and
    AND (dbo.DHBMappingTable.[DHB Name] = @dhbname )
    The values of  " @dhb_service" and "@dhbname" need to be entered when the stored procedure is executed. Now when I execute the stored procedure through the following statement:
    exec enterdhbnameDhbService
    @dhb_service = 'canterbury' ,@dhbname = 'south canterbury'
    SQL does not give me any results, only empty table gets displayed. I have checked the combination.. This combination does exist in my table
    pls help guys

    Increase the size of the stored procedure parameters as "mitasid" suggested.
    Remove HAVING clause,
    SELECT dbo.DHBMappingTable.[DHB Name], dbo.Agency.DHB_service, dbo.PurchaseUnitMappingTable.PU,
    SUM(dbo.[NMDS Data for IDF Report].[Number of caseweighted discharges]) AS Expr1, dbo.AdmissionMappingTable.Admission
    FROM dbo.DomicileCodes INNER JOIN dbo.[NMDS Data for IDF Report]
    ON dbo.DomicileCodes.[Domicile code] = dbo.[NMDS Data for IDF Report].[Domicile Code]
    INNER JOIN dbo.PurchaseUnitMappingTable
    ON dbo.[NMDS Data for IDF Report].[Purchase Unit] = dbo.PurchaseUnitMappingTable.PU
    INNER JOIN dbo.AdmissionMappingTable
    ON dbo.[NMDS Data for IDF Report].[Admission Type Description] = dbo.AdmissionMappingTable.[Admission Type Description]
    INNER JOIN dbo.Agency
    ON dbo.[NMDS Data for IDF Report].[Agency Name] = dbo.Agency.Agengy
    INNER JOIN dbo.DHBMappingTable
    ON dbo.DomicileCodes.[DHB area] = dbo.DHBMappingTable.[DHB Code]
    WHERE
    dbo.[NMDS Data for IDF Report].[Financial Year] = '20062007'
    AND (dbo.Agency.DHB_service = @dhb_service)
    AND (dbo.DHBMappingTable.[DHB Name] = @dhbname)   
    GROUP BY
    dbo.DHBMappingTable.[DHB Name],
    dbo.Agency.DHB_service,
    dbo.PurchaseUnitMappingTable.PU,
    dbo.AdmissionMappingTable.Admission
    Regards, RSingh

  • Size limitation that can be passed to Java stored procedure

    Hello!
    I enjoy using Oracle8i these days. But I have some questions
    about Java stored procedure. I want to pass the XML data to Java
    stored procedure as IN parameter. But I got some errors when the
    data size is long. Is there any limitation in the data size that
    can be passed to Java stored procedure?
    Would you please help me ?
    This message is long, but would you please read my message?
    Contents
    1. Outline : I write what I want to do and the error message I
    got
    2. About the data size boundary: I write about the boundary
    size. I found that it depend on which calling sequence I use.
    3. The source code of the Java stored procedure
    4. The source code of the Java code that call the Java stored
    procedure
    5. The call spec
    6. Environment
    1.Outline
    I want to pass the XML data to Java stored procedure. But I got
    some errors when the data size is long. The error message I got
    is below.
    [ Error messages and stack trace ]
    java.sql.SQLException: ORA-01460: unimplemented or unreasonable
    conversion reque
    sted
    java.sql.SQLException: ORA-01460: unimplemented or unreasonable
    conversion reque
    sted
    at oracle.jdbc.ttc7.TTIoer.processError(Compiled Code)
    at oracle.jdbc.ttc7.Oall7.receive(Compiled Code)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(Compiled Code)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch
    (TTC7Protocol.java:721
    at oracle.jdbc.driver.OracleStatement.doExecuteOther
    (Compiled Code)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch
    (Compiled Code)
    at oracle.jdbc.driver.OracleStatement.doExecute(Compiled
    Code)
    at
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(Compiled
    Code
    at
    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate
    (OraclePrepar
    edStatement.java:256)
    at oracle.jdbc.driver.OraclePreparedStatement.execute
    (OraclePreparedStat
    ement.java:273)
    at javaSp.javaSpTestMain.sample_test
    (javaSpTestMain.java:37)
    at javaSp.javaSpTestMain.main(javaSpTestMain.java:72)
    2. About the data size boundary
    I don|ft know the boundary that I got errors exactly, but I
    found that the boundary will be changed if I use |gprepareCall("
    CALL insertData(?)");|h or |gprepareCall ("begin insertData
    (?); end ;")|h.
    When I use |gprepareCall(" CALL insertData(?)".
    The data size 3931 byte --- No Error
    The data size 4045 byte --- Error
    Whne I use prepareCall ("begin insertData(?); end ;")
    The data size 32612 byte --No Error
    The data size 32692 byte --- Error
    3. The source code of the Java stored procedure
    public class javaSpBytesSample {
    public javaSpBytesSample() {
    public static int insertData( byte[] xmlDataBytes ) throws
    SQLException{
    int oraCode =0;
    String xmlData = new String(xmlDataBytes);
    try{
    Connection l_connection; //Database Connection Object
    //parse XML Data
    dits_parser dp = new dits_parser(xmlData);
    //Get data num
    int datanum = dp.getElementNum("name");
    //insesrt the data
    PreparedStatement l_stmt;
    for( int i = 0; i < datanum; i++ ){
    l_stmt = l_connection.prepareStatement("INSERT INTO test
    " +
    "(LPID, NAME, SEX) " +
    "values(?, ?, ?)");
    l_stmt.setString(1,"LIPD_null");
    l_stmt.setString(2,dp.getElemntValueByTagName("name",i));
    l_stmt.setString(3,dp.getElemntValueByTagName("sex",i));
    l_stmt.execute();
    l_stmt.close(); //Close the Statement
    l_stmt = l_connection.prepareStatement("COMMIT"); //
    Commit the changes
    l_stmt.execute();
    l_stmt.close(); //Close the Statement l_stmt.execute
    (); // Execute the Statement
    catch(SQLException e ){
    System.out.println(e.toString());
    return(e.getErrorCode());
    return(oraCode);
    4. The source code of the Java code that call the Java stored
    procedure
    public static void sample_test(int num) {
    //make data
    Patient p = new Patient();
    byte[] xmlData = p.generateXMLData(num);
    try{
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    Connection m_connection = DriverManager.getConnection
    ("jdbc:oracle:thin:@max:1521:test",
    "testuser", "testuser");
    CallableStatement l_stmt =
    // m_connection.prepareCall(" CALL insertData(?)");
    m_connection.prepareCall("begin insertData(?); end
    l_stmt.setBytes(1,xmlData);
    l_stmt.execute();
    l_stmt.close();
    System.out.println("SUCCESS to insert data");
    catch(SQLException e ){
    System.out.println( e.toString());
    e.printStackTrace();
    5. The call spec
    CREATE OR REPLACE PROCEDURE insertData( xmlData IN LONG RAW)
    AS
    LANGUAGE JAVA NAME 'javaSp.javaSpBytesSample.insertData(byte[])';
    6. Environment
    OS: Windows NT 4.0 SP3
    RDBMS: Oracle 8i Enterprise Edition Release 8.1.5.0.0 for
    Windows NT
    JDBC Driver: Oracle JDBC Drivers 8.1.5.0.0.
    JVM: Java1.1.6_Borland ( The test program that call Java stored
    procedure run on this Java VM)
    null

    Iam passing an array of objects from Java to the C
    file. The total size of data that Iam sending is
    around 1GB. I have to load this data into the Shared
    memory after getting it in my C file. Iam working on
    HP-UX (64-bit). Everything works fine for around 400MB
    of data. When I try to send around 500MB of data, the
    disk utilization becomes 100%, so does my memory
    utilization and I get a "Not enough space" when I try
    to access shared memory. I have allocated nearly 2.5GB
    in my SHMMAX variable. Also, I have around 45GB of
    disk free. The JVM heap size is also at 2048MB. Where did you get the 400/500 number from? Is that the size of the file?
    What do you do with the data? Are you doing nothing but copying it byte for byte into shared memory?
    If yes then a simple test is to write a C application that does the same thing. If it has problems then it means you have an environment problem.
    If no then you are probably increasing the size of the data by creating a structure to hold it. How much overhead does that add to the size of the data?

  • Strange download size of on calling packaged stored procedure in VB6

    Hi,
    I tried to use VB6 to call oracle stored procedure with ref cursor as output parameter under a package in 10g database (10.1.03). Oracle client uses windows 9.2 / 10.1.02 (Oracle OLEDB Provider) . I found that when the package size increases(> 1000 lines codes), the data size transfer from database to VB client also increases. I try to trap the binary data flow between VB6 and database when calling packaged stored procedure. I found that VB6(or oracle client ??) will first download package spec then execute the requested stored procedure. This may explain the cause of increasing size.
    However, this large download size for calling only one of the procedure will make my application run slowly when my application uses the package much. How can I solve this problem ? Does this relate to oracle client(p.s. this problem disappear when using Microsoft OLEDB Provider)?
    Thanks
    Steven

    You can use a wrapper to get compiled code and if it's 10g you can do even more by putting it in a library.
    OLEDB from VB6 still using Oracle 'Client' as you call Oracle NET.

  • 10.2.0.3 driver. Maximum limit of parameters in a stored procedure

    What is the Maximum limit of parameters that can be passed to a stored procedure via ODBC? We got a function that was executed successfully by the 9i driver with 272 parameters. The same function fails when executed with 10.2.0.3 driver with ORA-06513 error. We then tried reducing the parameters and found that the driver would allow a maximum of 253 parameters. Any ideas or thoughts on this is much appreciated.

    Update for future reference:
    Finally got a metalink account and ran with the latest instantclient patch. This seemed to stop the heap corruption problem.

  • Maximum Length of Stored Procedure Name

    Hi,
    What is the maximum length of the name of a stored procedure?
    Thanks

    Yabut:
    SQL> desc dba_objects
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME VARCHAR2(128)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                          NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(18)
    CREATED                                            DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    SQL> desc user_objects
    Name                                      Null?    Type
    OBJECT_NAME VARCHAR2(128)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                          NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(18)
    CREATED                                            DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)

  • 4gb file size limitation using java.io.* package in java stored procedure

    Does anyone know about file size limitations when using java.io.* package inside java stored procedures. I have some java stored procedures that read and write to files. They error out when run as a java stored procedure within oracle on files over 4gb. I have no problems with these procedures when I test them outside of oracle.

    I am using 10g Release 10.2.0.1.0, the java version returned by the Oracle JVM is 1.4.2_04
    When I tested it outside of oracle I ran it using the java run time in ORACLE_HOME\jdk\bin and it works perfectly on files larger than 4gb.
    Thank you for the UTL_FILE suggestion. I have considered using that but there is one method in Java that I can't seem to find a corresponding procedure for in PL/SQL.
    RandomAccessFile.setLength()
    This allows me to truncate a file. I have a need to strip bytes off the end of a file without creating a copy because I am working with large files and disk space may be limited. It is also much slower to read from the original file and writing the same bytes to a new file (minus the trailing bytes).
    If anybody has any insight about the 4gb java.io limitation in Oracle JVM or has a workaround in PL/SQL for the RandomAccessFile.setLength() method in Java, I would really appreciate the help.
    Thanks,
    Thach

  • Maximum number of parameters sent to stored procedure

    I have a web form from where I insert data to Oracle. There are at least 20 fileds on the form. For INSERT I want to use Stored Procedure. But in this case for VALUES section of the INSERT statement I need to send that many- in this case 20 parameters. Is this normal for a procedure to receive 20 parameters? If it's not, then what way should I follow to perform this? I know technically there's no problem but is this normal programming or database managementwise? I think this is the basic thing all web developer do all the time.

    He's got 20 fields on a web form and you think using SQL*Loader is a good idea ?because I do not believe that he has to enter these fields once time.
    You want him to write the values to a flat file, generate a control file, then invoke SQL*Loader ?I know that the first time you create all those files can be a problem, but when you have all , the next times its just change the information into flat file.
    Did you read the question ?Yes, i did
    It's only my opinion, He can accept it or not.
    any other question not related to help him to solve his problem?

  • Arguments in a stored procedure.

    Hi,
    Please can you tell me:
    What is the maximum size of a VARCHAR2 parameter as passed as an argument in an Oracle stored procedure.
    e.g.
    CREATE OR REPLACE PROCEDURE test (test_param VARCHAR2)
    IS
    The maximum string length of test_param is?
    Thanks,
    Duncan

    In the declaration of a stored procedure only the argument types are specified, not the sizes or lengthsIt's annoying that we cannot enforce sizings even if we use a SUBTYPE to declare a parameter in a procedure's signature: it can only be done inside the procedure itself....
    SQL> create or replace package my_subtypes as
      2     subtype ltd_string is varchar2(10);
      3  end;
      4  /
    Package created.
    SQL> create or replace function my_f
      2      (p_in in my_subtypes.ltd_string)
      3      return number
      4  as
      5  begin
      6      return length(p_in);
      7  end;
      8  /
    Function created.
    SQL> select my_f(to_char(sysdate, 'dd-mon-yyyy hh24:mi:ss'))
      2  from dual
      3  /
    MY_F(TO_CHAR(SYSDATE,'DD-MON-YYYYHH24:MI:SS'))
                                                20
    SQL> create or replace function my_f
      2      (p_in in my_subtypes.ltd_string)
      3      return number
      4  as
      5      lv my_subtypes.ltd_string;
      6  begin
      7      lv := p_in;
      8      return length(lv);
      9  end;
    10  /
    Function created.
    SQL> select my_f(to_char(sysdate, 'dd-mon-yyyy hh24:mi:ss'))
      2  from dual
      3  /
    select my_f(to_char(sysdate, 'dd-mon-yyyy hh24:mi:ss'))
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "APC.MY_F", line 7
    SQL>Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Write CLOB in stored procedure from a passed Long over 4k

    Hi,
    I have a requirement to write a CLOB into a table as part of a stored procedure. The data to be written is passed in as a long to avoid any maximum size issues. Previously I was able to simple insert the LONG into the column which was a CLOB with no problem however we had a patch applied to out 8.1.6 database which now does not let the procedure and complains of a bad type.
    To work around this I have attempted to instead convert the LONG into a temporary CLOB and write the CLOB (below is basically what it does):
    CREATE PROCEDURE WRITE CLOB (data IN long)
    IS
    v_lob_add CLOB;
    v_size integer;
    BEGIN
    dbms_lob.CREATETEMPORARY(v_lob_add,true,dbms_lob.call);
    select vsize(data) into v_size from dual;
    dbms_lob.WRITE(v_lob_add,v_size,1,pi_add);
    insert into tab1 values (v_lob_add);
    END ADD_LONG2LOB;
    This works fine unless the LONG is over 4001 as this causes the 'select vsize(..' to fail with an 'unreasonable conversion' error.
    My question is:
    1, How can you get the length of a long if its over 4000
    2, Can dbms_lob.WRITE be passed a length over 4000
    3, If none of the above how can a LONG be converted to a CLOB for insertion
    4, Is it a bug that I can't just insert the LONG into the CLOB column (which I could do before this patch was installed 2 days ago!).
    Many thanks for your time.
    John

    Worked out how to get LONG length so just for anyones interest the following works fine:
    PROCEDURE INSERT_INCOMING2(
    chr_MMS_REF IN CHAR,
    chr_NATIVE_MSG IN LONG,
    ) IS
    v_lob2 CLOB;
    v_size integer;
    y varchar2(100);
    BEGIN
    dbms_lob.CREATETEMPORARY(v_lob2,true,dbms_lob.call);
    v_size :=0;
    loop
    y := substr(chr_NATIVE_MSG,v_size,100);
    exit when y is null;
    v_size := v_size + length(y);
    end loop;
    v_size:=v_size-1;
    dbms_lob.WRITE(v_lob2, v_size,1, chr_NATIVE_MSG);
    INSERT INTO INCOMING (MMS_REF, NATIVE_MSG) VALUES(
    chr_MMS_REF,
    v_lob2,);
    END INSERT_INCOMING2;

  • Speed test: PL/SQL vs. Java Stored Procedures

    I performed tests on these two procedures:
    ===========================================
    // Create a Statement
    Statement stmt = conn.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    // Query the table
    ResultSet rset = stmt.executeQuery ("select SIFOB, SIFRA_GU from sezko");
    while (rset.next ()) {
    salary = rset.getInt(1);
    rset.updateInt (1, salary + 1);
    salary = rset.getInt(2);
    rset.updateInt (2, salary + 1);
    rset.updateRow();
    } // while
    conn.commit();
    // Close the RseultSet
    rset.close();
    // Close the Statement
    stmt.close();
    ===========================================
    procedure updateTable is
    cursor c_updateTable is select rowid, SIFOB, SIFRA_GU from sezko;
    begin
    for r_updateTable in c_updateTable loop
    update sezko set SIFOB = SIFOB + 1, SIFRA_GU = SIFRA_GU + 1 where rowid = r_updateTable.rowid;
    end loop;
    commit;
    end;
    ===========================================
    First procedure is written in Java (as Java Stored procedure) and second is PL/SQL.
    Java is about 10x slower than PL/SQL code.
    Can you explain bad performance results?
    thank you
    Matic & Ales

    Hi,
    I suppose the problem is not with the connection object,but with make connection to the database for every executeupdate or executeupdaterow called .Similarly for fetching the data from the database you
    can use the fetch size technique.Please check the 8.1.6 Java Developers guide for using this.
    Update Batching(For Batch updates and commits)
    Fetch Size(For Batch fetching)
    Oracle Row Pre-Fetching
    Regards
    Anand
    null

  • How to get an updatable ADODB Recordset from a Stored Procedure?

    In VB6 I have this code to get a disconnected ADODB Recordset from a Oracle 9i database (the Oracle Client is 10g):
    Dim conSQL As ADODB.Connection
    Dim comSQL As ADODB.Command
    Dim recSQL As ADODB.Recordset
    Set conSQL = New ADODB.Connection
    With conSQL
    .ConnectionString = "Provider=OraOLEDB.Oracle;Password=<pwd>;Persist Security Info=True;User ID=<uid>;Data Source=<dsn>"
    .CursorLocation = adUseClientBatch
    .Open
    End With
    Set comSQL = New ADODB.Command
    With comSQL
    .ActiveConnection = conSQL
    .CommandType = adCmdStoredProc
    .CommandText = "P_PARAM.GETALLPARAM"
    .Properties("PLSQLRSet").Value = True
    End With
    Set recSQL = New ADODB.Recordset
    With recSQL
    Set .Source = comSQL
    .CursorLocation = adUseClient
    .CursorType = adOpenStatic
    .LockType = adLockBatchOptimistic
    .Open
    .ActiveConnection = Nothing
    End With
    The PL/SQL Procedure is returning a REF CURSOR like this:
    PROCEDURE GetAllParam(op_PARAMRecCur IN OUT P_PARAM.PARAMRecCur)
    IS
    BEGIN
    OPEN op_PARAMRecCur FOR
    SELECT *
    FROM PARAM
    ORDER BY ANNPARAM DESC;
    END GetAllParam;
    When I try to update some values in the ADODB Recordset (still disconnected), I get the following error:
    Err.Description: Multiple-step operation generated errors. Check each status value.
    Err.Number: -2147217887 (80040E21)
    Err.Source: Microsoft Cursor Engine
    The following properties on the Command object doesn't change anything:
    .Properties("IRowsetChange") = True
    .Properties("Updatability") = 7
    How can I get an updatable ADODB Recordset from a Stored Procedure?

    4 years later...
    I was having then same problem.
    Finally, I've found how to "touch" the requierd bits.
    Obviously, it's hardcore, but since some stupid at microsoft cannot understand the use of a disconnected recordset in the real world, there is no other choice.
    Reference: http://download.microsoft.com/downlo...MS-ADTG%5D.pdf
    http://msdn.microsoft.com/en-us/library/cc221950.aspx
    http://www.xtremevbtalk.com/showthread.php?t=165799
    Solution (VB6):
    <pre>
    Dim Rst As Recordset
    Rst.Open "select 1 as C1, '5CHARS' as C5, sysdate as C6, NVL(null,15) as C7, null as C8 from DUAL", yourconnection, adOpenKeyset, adLockBatchOptimistic
    Set Rst.ActiveConnection = Nothing
    Dim S As New ADODB.Stream
    Rst.Save S, adPersistADTG
    Rst.Close
    Set Rst = Nothing
    With S
    'Debug.Print .Size
    Dim Bytes() As Byte
    Dim WordVal As Integer
    Dim LongVal As Long
    Bytes = .Read(2)
    If Bytes(0) <> 1 Then Err.Raise 5, , "ADTG byte 0, se esperaba: 1 (header)"
    .Position = 2 + Bytes(1)
    Bytes = .Read(3)
    If Bytes(0) <> 2 Then Err.Raise 5, , "ADTG byte 9, se esperaba: 2 (handler)"
    LongVal = Bytes(1) + Bytes(2) * 256 ' handler size
    .Position = .Position + LongVal
    Bytes = .Read(3)
    If Bytes(0) <> 3 Then Err.Raise 5, , "ADTG, se esperaba: 3 (result descriptor)"
    LongVal = Bytes(1) + Bytes(2) * 256 ' result descriptor size
    .Position = .Position + LongVal
    Bytes = .Read(3)
    If Bytes(0) <> 16 Then Err.Raise 5, , "ADTG, se esperaba: 16 (adtgRecordSetContext)"
    LongVal = Bytes(1) + Bytes(2) * 256 ' token size
    .Position = .Position + LongVal
    Bytes = .Read(3)
    If Bytes(0) <> 5 Then Err.Raise 5, , "ADTG, se esperaba: 5 (adtgTableDescriptor)"
    LongVal = Bytes(1) + Bytes(2) * 256 ' token size
    .Position = .Position + LongVal
    Bytes = .Read(1)
    If Bytes(0) <> 6 Then Err.Raise 5, , "ADTG, se esperaba: 6 (adtgTokenColumnDescriptor)"
    Do ' For each Field
    Bytes = .Read(2)
    LongVal = Bytes(0) + Bytes(1) * 256 ' token size
    Dim NextTokenPos As Long
    NextTokenPos = .Position + LongVal
    Dim PresenceMap As Long
    Bytes = .Read(3)
    PresenceMap = Val("&H" & Right$("0" & Hex$(Bytes(0)), 2) & Right$("0" & Hex$(Bytes(1)), 2) & Right$("0" & Hex$(Bytes(2)), 2))
    Bytes = .Read(2) 'ColumnOrdinal
    'WordVal = Val("&H" & Right$("0" & Hex$(Bytes(0)), 2) & Right$("0" & Hex$(bytes(1)), 2))
    'Aca pueden venir: friendly_columnname, basetable_ordinal,basetab_column_ordinal,basetab_colname
    If PresenceMap And &H800000 Then 'friendly_columnname
    Bytes = .Read(2) 'Size
    LongVal = Bytes(0) + Bytes(1) * 256 ' Size
    .Position = .Position + LongVal * 2 '*2 debido a UNICODE
    End If
    If PresenceMap And &H400000 Then 'basetable_ordinal
    .Position = .Position + 2 ' 2 bytes
    End If
    If PresenceMap And &H200000 Then 'basetab_column_ordinal
    .Position = .Position + 2 ' 2 bytes
    End If
    If PresenceMap And &H100000 Then 'basetab_colname
    Bytes = .Read(2) 'Size
    LongVal = Bytes(0) + Bytes(1) * 256 ' Size
    .Position = .Position + LongVal * 2 '*2 debido a UNICODE
    End If
    Bytes = .Read(2) 'adtgColumnDBType
    'WordVal = Val("&H" & Right$("0" & Hex$(Bytes(0)), 2) & Right$("0" & Hex$(bytes(1)), 2))
    Bytes = .Read(4) 'adtgColumnMaxLength
    'LongVal = Val("&H" & Right$("0" & Hex$(Bytes(3)), 2) & Right$("0" & Hex$(Bytes(2)), 2) & Right$("0" & Hex$(Bytes(1)), 2) & Right$("0" & Hex$(Bytes(0)), 2))
    Bytes = .Read(4) 'Precision
    'LongVal = Val("&H" & Right$("0" & Hex$(Bytes(3)), 2) & Right$("0" & Hex$(Bytes(2)), 2) & Right$("0" & Hex$(Bytes(1)), 2) & Right$("0" & Hex$(Bytes(0)), 2))
    Bytes = .Read(4) 'Scale
    'LongVal = Val("&H" & Right$("0" & Hex$(Bytes(3)), 2) & Right$("0" & Hex$(Bytes(2)), 2) & Right$("0" & Hex$(Bytes(1)), 2) & Right$("0" & Hex$(Bytes(0)), 2))
    Dim ColumnFlags() As Byte, NewFlag0 As Byte
    ColumnFlags = .Read(1) 'DBCOLUMNFLAGS, First Byte only (DBCOLUMNFLAGS=4 bytes total)
    NewFlag0 = ColumnFlags(0)
    If (NewFlag0 And &H4) = 0 Then 'DBCOLUMNFLAGS_WRITE (bit 2) esta OFF
    'Lo pongo en ON, ya que quiero escribir esta columna LOCALMENTE en el rst DESCONECTADO
    NewFlag0 = (NewFlag0 Or &H4)
    End If
    If (NewFlag0 And &H8) <> 0 Then 'DBCOLUMNFLAGS_WRITEUNKNOWN (bit 3) esta ON
    'Lo pongo en OFF, ya que no me importa si NO sabes si se puede updatear no, yo lo se, no te preocupes
    'ya que quiero escribir esta columna LOCALMENTE en el rst DESCONECTADO
    NewFlag0 = (NewFlag0 And Not &H8)
    End If
    If (NewFlag0 And &H20) <> 0 Then 'DBCOLUMNFLAGS_ISNULLABLE (bit 5) esta OFF
    'Lo pongo en ON, ya que siendo un RST DESCONECTADO, si le quiero poner NULL, le pongo y listo
    NewFlag0 = (NewFlag0 Or &H20)
    End If
    If NewFlag0 <> ColumnFlags(0) Then
    ColumnFlags(0) = NewFlag0
    .Position = .Position - 1
    .Write ColumnFlags
    End If
    .Position = NextTokenPos
    Bytes = .Read(1)
    Loop While Bytes(0) = 6
    'Reconstruyo el Rst desde el stream
    S.Position = 0
    Set Rst = New Recordset
    Rst.Open S
    End With
    'TEST IT
    On Error Resume Next
    Rst!C1 = 15
    Rst!C5 = "MUCHOS CHARS"
    Rst!C7 = 23423
    If Err.Number = 0 Then
    MsgBox "OK"
    Else
    MsgBox Err.Description
    End If
    </pre>

  • Resultset from a Stored Procedure

    Hello Everyone,
    Is it possible to return a resultset from a stored procedure? I need to do display set of rows which are resulted by joining few tables.
    Is it possible?
    Please help..
    TIA
    Regards,
    Rao Santapur.
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Raymond Tang ([email protected]):
    You can use 'REF CURSOR'<HR></BLOCKQUOTE>
    I have created a stored procedure with a ref cursor- what parameters do i need to pass via Sql*Plus to get results?
    [email protected]
    null

Maybe you are looking for

  • Problem with EAP and RADIUS

    Hi *,   I have the following problem with RADIUS and EAP authentication. Radius server sends an "Access-Accept" packet to my AP, but the station does not authenticate. I've tried with different encryption configuration and with different authenticati

  • Error while updating appraisal

    dear All, One user is getting error while updating on appraisal. It works fine for all other users. Below are the details of error. Appreciate response on this. Error Page Exception Details. oracle.apps.fnd.framework.OAException: java.lang.NullPointe

  • How can I get Adobe Acrobat 9 Standard installed againg into my notebook Vaio windows7 Pro?

    This Adobe software was preloaded in my Notebook and was unistalled by accident. I've tried to install it using my notebook tools however it doesn't work. I really appreciate your help. Best Regards, Oscar.

  • SP4 Upgrade problem

    Hi Guys, I have upgraded from SP3 to SP4. I use documentum 5.3 as CMS. I get this error when I try to see my portal home page. SEVERE 7/19/05 10:43:44 AM findIDs: Throwing exception: com.bea.content.RepositoryException: Error executing sear ch: Searc

  • All photos displayed in Lightroom are very dark

    This has just started in the last few days. Now all my imports into Lightroom 1.4.1 appear very dark compared to shots on camera display or same photo displayed outside Lightroom. This applies to dng, raw, or jpeg. Old libraries now all appear dark.