Re: OO4O and No FindFirst

From: Jim Kennedy <odysscci_at_teleport.com>
Date: 1995/05/04
Message-ID: <odysscci.345.00153359_at_teleport.com>#1/1


In article <kmajkutD80M6s.F4C_at_netcom.com> kmajkut_at_netcom.com (Keith Majkut) writes:
>Newsgroups: comp.databases.oracle
>Path: news.teleport.com!news.teleport.com!news.reed.edu!usenet.ee.pdx.edu!news.netins.net!solaris.cc.vt.edu!news.mathworks.com!gatech!howland.reston.ans.net!ix.netcom.com!netcom.com!kmajkut
>From: kmajkut_at_netcom.com (Keith Majkut)
>Subject: Re: OO4O and No FindFirst
>Message-ID: <kmajkutD80M6s.F4C_at_netcom.com>
>Organization: NETCOM On-line Communication Services (408 261-4700 guest)
>References: <sarek.10.005CEF52_at_cais.com>
>Date: Wed, 3 May 1995 18:32:52 GMT
>Lines: 15
>Sender: kmajkut_at_netcom4.netcom.com

>In article <sarek.10.005CEF52_at_cais.com>,
>Scott T. Johnson <sarek_at_cais.com> wrote:
>>I have been converting a VB application from Access to Oracle and using
>>OO4O to simplify the amount of code that must be re-written. I found that
>>the FindFirst, FindNext, FindPrevious, and FindLast functions are not
>>supported. What is the best way to work around this problem?
>The best workaround would be to use SQL parameters and then refresh the
>dynaset(different from recreating the dynaset) based on new values.
>Take a look at the examples for the Add/Remove methods(of parameters) in
>the online doc.
 

>>
>>Why aren't they supported?
>>
>>Scott

Here is how FindFirst et al works. It retrieves each row until it finds a match. That is not very efficient. It was the best thing you could do if you were useing xbase technology and did not have an index on that thing you wanted to find. With Oracle (and most other server based databases) you can search for whatever you want withoutthe requirement of having an index; albeit the search will be slower than an index search. Would you rather have the server handle the search via editing your sql query and submitting it (or if you can use parameters the above suggestion is much better and faster.) or would you rather drag a larger than neccessary result set over the wire to find some rows. I vote for the server.

Certainly, Oracle could have written a findFirst et al that worked on the server end but I SUSPECT that they did not see any need to copy the xbase paradigm.

Jim Kennedy Received on Thu May 04 1995 - 00:00:00 CEST

Original text of this message