Board index » delphi » ttable.recno does not work !! >TeamB

ttable.recno does not work !! >TeamB

I use D4#2 professional. The following example with a simple
MS-ACCESS-table always returns -1 for the ttable.recno-property:

procedure TForm1.Button1Click(Sender: TObject);
begin
  with table1 do begin
    open;
    while not eof do begin
      form1.caption:= inttostr(recno);
      application.processmessages;
      next;
    end;
    close;
  end;
end;

What is wrong here ?

Thanks,
TRIAC Datentechnik GmbH
Christian Oestmann

 

Re:ttable.recno does not work !! >TeamB


Someone correct me if I'm wrong, but doesn't recno only work with Paradox?

--
Michael Glatz
mgl...@caiso.com

Quote
Christian Oestmann wrote in message <366EEDEA.96A35...@t-online.de>...
>I use D4#2 professional. The following example with a simple
>MS-ACCESS-table always returns -1 for the ttable.recno-property:

>procedure TForm1.Button1Click(Sender: TObject);
>begin
>  with table1 do begin
>    open;
>    while not eof do begin
>      form1.caption:= inttostr(recno);
>      application.processmessages;
>      next;
>    end;
>    close;
>  end;
>end;

>What is wrong here ?

>Thanks,
>TRIAC Datentechnik GmbH
>Christian Oestmann

Re:ttable.recno does not work !! >TeamB


Quote
>Someone correct me if I'm wrong, but doesn't recno only work with Paradox?

It works with dBASE as well.

---------------------------------------
Terry Swiers
Millennium Software, LLC

Atrex Inventory Control/POS -
   '96, '97, '98 - Ziff-Davis/PC Magazine Shareware Award Finalist

http://www.1000years.com

---------------------------------------

Re:ttable.recno does not work !! >TeamB


Quote
Christian Oestmann wrote:

> I use D4#2 professional. The following example with a simple
> MS-ACCESS-table always returns -1 for the ttable.recno-property:

> ......

> What is wrong here ?

> Thanks,
> TRIAC Datentechnik GmbH
> Christian Oestmann

ACCESS files are not tables comparable to dBase, FoxPro or Paradox.
ACCESS file are really a file storage system for access commands,
procedures, etc. as well as data all in one. That is why it is difficult
to extract a record number.

-----------------------------------------------------------------
Paul Lee ........... Abri Technologies ......... http://abri.com/
    'Recover' - top rated dBase/FoxPro file repair utility.
-----------------------------------------------------------------

Re:ttable.recno does not work !! >TeamB


I beg to disagree, Bill, but Access does maintain record numbers. It
is known as the absolute position and I use it through my DAO
components that I built. I wonder why the BDE doesn't use those with
it's native driver. The absolute position property has been a part of
Access databases for some time now.

Woody

Quote
Bill Todd (TeamB) wrote in message <74n2qa$c...@forums.borland.com>...
>Access does not maintain record numbers.

>Bill

>--
>Bill Todd
>(Sorry but TeamB cannot answer questions received via email)
>(Remove nospam from my email address to contact me for any other
reason)

Re:ttable.recno does not work !! >TeamB


Thanks for the correction Woody.  I know that Inprise says the BDE driver
views Access as a SQL database in much the same way that it views database
servers so I assume they do not provide any access to the record number.

Bill

--
Bill Todd
(Sorry but TeamB cannot answer questions received via email)
(Remove nospam from my email address to contact me for any other reason)

Other Threads