Recent

Author Topic: DBF Edit if exist.  (Read 408 times)

Petrus Vorster

  • Jr. Member
  • **
  • Posts: 69
DBF Edit if exist.
« on: September 03, 2024, 09:35:49 am »
Hi all.

The next step I need to master using a TDBF is the following:
(normal DBF Database)

Check if a record exists, Edit it with some new info if it does, or create a new Record if it doesnt.

For instance, I have a record of Tracking Number, ReceiveDate, Client Details etc.
The tracking info can be scanned in before or added manually later.

So i need to check if that Tracking number is in the database, and If so, add the new client details, and If not then create a new record.

I assume it has to be a combination of most of the commands you showed me, but I would rather  ask before I mess up.

Regards,

Peter

Zvoni

  • Hero Member
  • *****
  • Posts: 2635
Re: DBF Edit if exist.
« Reply #1 on: September 03, 2024, 09:58:32 am »
Locate-Function of TDataset, since it returns a Boolean Found Yes/no
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Handoko

  • Hero Member
  • *****
  • Posts: 5290
  • My goal: build my own game engine using Lazarus
Re: DBF Edit if exist.
« Reply #2 on: September 03, 2024, 11:13:58 am »
When working with TDBF I use this documentation, very useful:
https://sourceforge.net/projects/tdbf/files/TDbf%20documentation/TDbf%20documentation%201.1/

And if I am working with SQL-based databases, I use this:
https://www.w3schools.com/sql/

Petrus Vorster

  • Jr. Member
  • **
  • Posts: 69
Re: DBF Edit if exist.
« Reply #3 on: September 03, 2024, 11:16:30 am »

Your documentaries, help files and assistance is great.
This function now works perfectly.

Now, just for rounding off the application, and my first Pascal app will be fully functional.

Thanks a million

-Peter

 

TinyPortal © 2005-2018