[Last Call] Learn how to a build a cloud-first strategyRegister Now


Row-00001 Cannot allocate memory

Posted on 2005-05-04
Medium Priority
Last Modified: 2013-12-25
Dear all,

We have a question in database programming with Visual Basic and Oracle 8i.

We are using stored procedures(grouped into packages) to get data from the database using the OraOLEDB provider.
We return resultsets from the stored procedures to VB.

During a long operation (lot of calls to different stored procedures) the returned recordset has rs.EOF = True but the request should return some rows.

Inspecting the returned recordset we realized that the "Row-00001 Cannot allocate memory" error was thrown.

Is there any way to know where the error comes from?

Usefull info:
-OraOledb provider on Oracle
-MDAC 2.8 Used
-The error is always produced at a different point in the application
-No error trace appears at server side
-CursorSide = adUseServer

Question by:BusinessVisionSS
  • 5
  • 4
LVL 29

Expert Comment

ID: 13926866
Take a look here:


and please show us your connection code.


Author Comment

ID: 13927027

I've already readed it, but this post does not aply to my problem as I always use early binding with the ADODB. prefix.

Anyway here is the the connection string:

Provider=OraOLEDB.Oracle.1;Password=ADI1;Persist Security Info=True;User ID=ADI1;Data Source=JULIUS;Extended Properties=""

PLSQLRSet parameter is changed at the ADODB.Command

I've tried also with CacheType=File but I still have the problem.

LVL 29

Expert Comment

ID: 13927098
Could you also show the code block where you are calling the package.  The more you can show the easier it will be to track this down.

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 13927505
The error appears on different stored procedures call (not always the same), I paste some code calling one of them

Dim m_oCmd As ADODB.Command
Dim m_oRs As ADODB.Recordset
Dim rs As ADODB.Recordset
Dim OI AS clsOI

    On Error GoTo Err_Handler
    'Create new ADODB.Command objetc and initialize it
    Set m_oCmd = New ADODB.Command
    Set m_oCmd.ActiveConnection = Parent.Connection
    m_oCmd.CommandText = "BVM.C_REV"
    m_oCmd.Prepared = True
    m_oCmd.CommandType = adCmdStoredProc
    m_oCmd.Properties("PLSQLRSet") = True

    'Input parameters
    With m_oCmd.Parameters
                .Append m_oCmd.CreateParameter("I_1", adVarChar, adParamInput, 3000, I_C)
                .Append m_oCmd.CreateParameter("I_2", adVarChar, adParamInput, 255, I_I)
                .Append m_oCmd.CreateParameter("I_3", adVarChar, adParamInput, 32, I_U)
                .Append m_oCmd.CreateParameter("I_4", adInteger, adParamInput,, I_P)
                .Append m_oCmd.CreateParameter("I_5", adVarChar, adParamInput, 3000, I_PT)
                .Append m_oCmd.CreateParameter("I_6", adVarChar, adParamInput, 3000, I_V)
    End With

        Set rs = m_oCmd.Execute
        Set OIS= New clsOIS
        While Not rs.EOF                        '<-------------- HERE rs.EOF = TRUE but should be FALSE
            Set OI= GetSession.RSFactory.GetOI_RS(rs)
            OIS.Add OI

        'OI Properties Recordset
        Set m_oRs = rs.NextRecordset
        OIS.LoadProperties_RS m_oRs, PreLoad
        Set m_oRs = Nothing
        Set rs = Nothing
LVL 29

Expert Comment

ID: 13927727
Try switching to client side cursor for your connection.



Author Comment

ID: 13927807
I can not use client side cursor due performance and I don't use the .Recordcount property.
Remeber the code is executed perfectly thousands of times and at some point it stops working.
LVL 29

Expert Comment

ID: 13927882
RecordCount -1 is just a symptom of the issue, it would not matter if you use it or not. How big are the recordsets you are returning?  It should not hit your performance that much unless the recordsets are really huge.

Have you tried running this without the Command object, but strictly with Recordset?


Author Comment

ID: 13928449
It depends, from 0 to 2000 rows, but changing the cursor side to client side really affects the performance.

Without the Command and with bind variables,How to do it?

Is there any way to measure the memory consumed by the OraOleDB on the client? If we can measure it maybe we can know where to look at.

LVL 29

Accepted Solution

leonstryker earned 1000 total points
ID: 13928563
>but changing the cursor side to client side really affects the performance.

Have you tested it?

>Without the Command

Dim m_oRs As ADODB.Recordset
Dim rs As ADODB.Recordset
    On Error GoTo Err_Handler
    strSQL = "Exec BVM.C_REV '" & I_C & "', '" &  I_I & "', '" & I_U & "', '" & I_P & "', '" & I_PT & "', " & I_V & "'"
     Set rs = New ADODB.Recordset
     rs.Open strSQL, Parent.Connection, adOpenStatic, adLockOptimisstic

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month18 days, 3 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question