Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Is OO4O notoriously slow with VB4?

Re: Is OO4O notoriously slow with VB4?

From: Ludo Joris <lujo_at_ruca.ua.ac.be>
Date: 1997/04/11
Message-ID: <334de381.1164464@news.ruca.ua.ac.be>#1/1

Force12 Solutions Ltd <Force12_at_force12.com> wrote:

>
>I've just tried what you suggested. With all three parameters in the
>createdynaset statement, only one record is returned even though a
>recordcount on the dynaset shows 500 records present. If I take out
>ORADYN_NOCACHE, all 500 records are loaded into the array, but it takes
>58 seconds! Am I going insane or am I doing something wrong?

If you specify ORADYN_NOCACHE creating a dynaset, rows from your table will not be locally cached. Use this option only if you make a single pass through your dynaset.

An example:

  set ds = OraDatabase.DbCreateDynaset(SQL, ORADYN_NOCACHE)

This works:

  while not ds.EOF
    ...
    ds.DbMoveNext
  wend

This doesn't work:

  For I = 1 to ds.DbRecordCount
    ...
    ds.DbMoveNext
  Next

Because OO4O has to go through all the records to count them (your first pass) and there are no rows cached, the code inside this for next loop will fail when you try to access a row (getting the value from a field for example).

As you can see here I'm not using the OO4O data control. Do you use the data control?

--
Ludo Joris
RUCA - University of Antwerp, Belgium
lujo_at_ruca.ua.ac.be
Received on Fri Apr 11 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US