Re: ADABAS to Oracle conversion

From: Frank <fvanbortel_at_netscape.net>
Date: Thu, 13 Feb 2003 20:10:30 +0100
Message-ID: <3E4BEDA6.4010002_at_netscape.net>


flyershistory wrote:
> We're in the early stages of attempting a conversion from ADABAS to
> Oracle.
>
> All of our database access in our programs is through a standard set
> of interface routines. Our idea was to simply translate these
> interface routines into oracle access ones.
>
> In the database read routines for example we would have:
>
> STATUS = ADA_READSORT( tablename,
> record structure that stores the data,
> descriptor name,
> starting value of descriptor,
> ending value of descriptor)
>
> For the first read, all values would be populated. If the starting and
> ending values of the descriptors are not populated, you want to get
> the equivalent of the next record in the cursor.
>
> Now the problem I can forsee is with the cursors. From reading usenet
> archives it seems anytime someone tries to put the opening and
> fetching of cursors into subroutines, it seems like they have
> problems. If I convert the "ADA_READSORT" to the equivalent oracle
> function, all the cursor declarations, opens and fetches would be
> within this subroutine (or in further subroutines that it would use).
> Is it possible to do this ? If I call "ADA_READSORT" the second time
> after the initial read (when I'm trying to get the second record in
> the record-set), would the fetch cursor work simply from using the
> same cursor name as the initial read ?
>
> Thanks in Advance,
> Peter

No - it would open and fetch again, until you wind up with "max open cursors exceeded" ORA-10000, iirc.

Get used to the idea the most efficient way to work with Oracle is resultsets. SQL delivers resultsets. You may get these in an array of some sort, and work from there, but I would rethink and redesign (and recode!) your application. Your approach may be workable, but the result will be a sub-optimal application.

Adabas is not Oracle...

-- 
Regards, Frank van Bortel
Received on Thu Feb 13 2003 - 20:10:30 CET

Original text of this message