Board index » delphi » Need D2 "Recno" property in D1

Need D2 "Recno" property in D1

Does anyone have any way of duplicating the "recno" property that is
available in Delphi 2 into Delphi 1? I have a large application which
I first wrote in Delphi 2 which uses recno properties for tables and
would really like to keep the code as close to original as possible. A
good portion of the code looks like:

  if form.table.recno < form.table.recordcount do begin
    do stuff
 end;

So, any ideas?
-------------------------------------------------------
Bryan Mohr (br...@herp.com)
http://www.herp.com
-------------------------------------------------------

 

Re:Need D2 "Recno" property in D1


Quote
On Sat, 07 Sep 1996 04:56:55 GMT, br...@mohr.com (Bryan Mohr) wrote:
>would really like to keep the code as close to original as possible. A
>good portion of the code looks like:

>  if form.table.recno < form.table.recordcount do begin
>    do stuff
> end;

What type of table are you using?

If you are using an xbase table (dBase), then the BDE call: dbiGetRecordNo,
if you are using Paradox tables, then you can use: dbiGetSeqNo to get the
*sequence* number. The sequence number of the record will depend on the
index in use. If no index, then it will be the same as record no.

If you're using SQL calls, then you're on your own.

Alan

Re:Need D2 "Recno" property in D1


Seems to me like you are testing for the end-of-table condition.  Why not
use the Eof property of the TTable object?

--
Mark Pritchard

Bryan Mohr <br...@mohr.com> wrote in article
<32310089.41246...@nntp.best.com>...

Quote
> Does anyone have any way of duplicating the "recno" property that is
> available in Delphi 2 into Delphi 1? I have a large application which
> I first wrote in Delphi 2 which uses recno properties for tables and
> would really like to keep the code as close to original as possible. A
> good portion of the code looks like:

>   if form.table.recno < form.table.recordcount do begin
>     do stuff
>  end;

> So, any ideas?
> -------------------------------------------------------
> Bryan Mohr (br...@herp.com)
> http://www.herp.com
> -------------------------------------------------------

Other Threads