FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Does TDatabase supports SEEK LAST?
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Does TDatabase supports SEEK LAST?
Posted: Tue Nov 07, 2023 05:03 AM

Looking at TDatabase of FWH1912, I don't see support for 3rd param for dbSeek(). It is the equivalent of SEEK LAST

Is this rectified in latest version of FWH?

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Does TDatabase supports SEEK LAST?
Posted: Tue Nov 07, 2023 05:54 AM
Please try
Code (fw): Select all Collapse
oDbf:DbSeek( cSeek, nil, .T. )
This works with FWH1912 also,
Don't bother if you can not find the method DbSeek()
With database class we call use any (x)Harbour function as if it is a method, if that function is linked to the application.

Note:
If you get runtime error, just include this line anywhere at the end of your prg
Code (fw): Select all Collapse
EXTERNAL DBSEEK
Regards



G. N. Rao.

Hyderabad, India
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Does TDatabase supports SEEK LAST?
Posted: Tue Nov 07, 2023 06:53 AM
Thanks Rao,
Saved me a few keystrokes :)
I normally would type as (oDbf:cAlias)->(dbSeek(cSeek, nil, .t.))
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Does TDatabase supports SEEK LAST?
Posted: Tue Nov 07, 2023 07:21 AM

Not only DBSEEK,

You can use any (x)Harbour function as if it is a METHOD.

Regards



G. N. Rao.

Hyderabad, India
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Does TDatabase supports SEEK LAST?
Posted: Fri Nov 10, 2023 01:42 AM
Saved me a few keystrokes :)
I normally would type as (oDbf:cAlias)->(dbSeek(cSeek, nil, .t.))
If you use database objects then you can just do:

oCustomer:goBottom()
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Does TDatabase supports SEEK LAST?
Posted: Fri Nov 10, 2023 04:08 AM
He is using database object.
But he is not looking for DbGoBottom()
He is looking for
Code (fw): Select all Collapse
SEEK cSeek LAST // i.e., DBSEEK( cSeek, nil, .T. )
which is totally different from "GoBottom()"
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion