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: Ilia Bashtanov <iliab_at_mmc.ru>
Date: 1997/04/10
Message-ID: <01bc45c5$6a233f60$25d9bec2@ib>#1/1

Do you write your code according to
OO4O Help ( Technical Notes -> Coding Techniques ).

If you use 'OraDynaset.Fields("field_name").Value' expression to retrieve values, it will be very slowly. You should store OraDynaset.Field objects in array:

  OraDynasetFieldsN = OraDynaset.Fields.Count   ReDim OraDynasetFields(OraDynasetFieldsN - 1)   For j = 0 To OraDynasetFieldsN - 1
    Set OraDynasetFields(j) = OraDynaset.Fields(j)   Next j

Then for each dynaset row you can retrieve values without executing extra methods
(getting fields, finding particular field, ...) each time when you move to the next row.

    For j = 1 To OraDynasetFieldsN

      v = OraDynasetFields(j - 1).value
      If IsNull(v) Then
        results(j - 1, i) = ""
      Else
          results(j - 1, i) = v
      End If

    Next j
-- 

~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ilia Bashtanov
iliab_at_mmc.ru
phone +7 (095) 974 30 30
fax   +7 (095) 974 30 20
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Force12 Solutions Ltd <Force12_at_force12.com> wrote in article
<CqJICBAcTNTzEwej_at_force12.com>...

> In article <01bc4589$2faffcb0$25d9bec2_at_ib>, Ilia Bashtanov
> <iliab_at_mmc.ru> writes
> >I've tested Oracle Objects for OLE 2.00.07.2.0 with VB4 (32 bit).
> >
> >500-row, 7-col array filled from dynaset in 2 seconds.
> > ^^^^^^^^^
> >It is faster than OO4O 2.00.07 (16 bit) with VB3 (5 - 6 seconds)
> >
> >Have you read OO4O Help (Technical Notes -> Coding Techniques) ?
> >I use ORADYN_READONLY + ORADYN_NOCACHE + ORADYN_NO_BLANKSTRIP
> >dynaset creation parameters and technique from above help topic.
> >
> >Best regards
> >~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >Ilia Bashtanov
> >iliab_at_mmc.ru
> >phone +7 (095) 974 30 30
> >fax +7 (095) 974 30 20
> >~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> Thanks Ilia
>
> 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?
>
> Hadi
> --
> Force12 Solutions Ltd
>
Received on Thu Apr 10 1997 - 00:00:00 CDT

Original text of this message

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