FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TDatabase Seek
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
TDatabase Seek
Posted: Wed Jun 30, 2021 12:29 PM

To All

I see Silvo ( seems ) to have a similar problem ...

What is the tDatabase equivalence of :

oDbf:SetOrder( "CustID" ) // understand this already

Set order to tag CustID
Seek cCustID // <----- here

oDbf:Seek cCustID ??

oDBf:GoTop()
oDBf:Find cCustID ??

I would rather use Seek than set a filter .....
Seek in traditional DBFCDX is much faster than using the Find command ..

Thanks

Rick Lipkin

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TDatabase Seek
Posted: Wed Jun 30, 2021 02:28 PM

oDbf:Seek( cCustID )

Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: TDatabase Seek
Posted: Wed Jun 30, 2021 02:32 PM

Rao .. thanks

Rick Lipkin

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: TDatabase Seek
Posted: Wed Jun 30, 2021 02:36 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: TDatabase Seek
Posted: Thu Jul 01, 2021 04:50 PM

Rick,

You can always look at the source code for TDatabase (xbrowse.prg) to find all the method names and their passed parameters.

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: TDatabase Seek
Posted: Thu Jul 01, 2021 09:16 PM
Rick,

Since you seem to be new to using OOP, may I recommend by two articles on OOP. They are somewhat dated since I wrote them 10 years ago, but still helpful to someone just getting started with OOP.

Introduction to Object-Oriented Programming Part 1 & Part 2

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: TDatabase Seek
Posted: Fri Jul 02, 2021 01:10 PM

James

Thanks .. been using ADO on Sql Databases for years ... the reason I am using DBFCDX is I have a substantial contract to encrypt one of my Billing Apps for SC State gov that uses a MS Access backend ..

In order to create new and existing Invoices .. I have to ( on the fly ) dencrypt the Customer table .. and to do that I am creating a temp .dbf table on the local hard drive .. Since I mixing ADO and DBFCDX .. I pass the table object's between various modules and traditional .dbf syntax just would not work .. hence my interest in tDatabase.

Also ... migrating the application to Sql Server which is much more secure than ms access since Access is a local database that resides on the local un-secure file server.

Thanks

Rick Lipkin

Continue the discussion