IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Paradox
Search Paradox Group:

Advanced
-Collapse +Expand Paradox To/From
To/FromCODEGuides
-Collapse +Expand Paradox Store
PRESTWOODSTORE

Prestwood eMagazine

February Edition
Subscribe now! It's Free!
Enter your email:

   ► KBDesktop Data...Paradox & Ob...ObjectPAL Co...OPAL: Langua...   Print This     
  From the September 2014 Issue of Prestwood eMag
 
Paradox OPAL: Language Details:
ObjectPAL Find Record (locate, qLocate)
 
Posted 15 years ago on 2/7/2010
Paradox Code Snippet:
 A flashcard from our Paradox Flashcards Library
 A code snippet from our Paradox Code Snippets Page

KB102113

Languages Focus: Find Record

Finding a record is about moving a cursor to a specific record within a set of records (documented here). In addition to finding a record, you can sort, filter, and loop a set of records (documented in their topics).

ObjectPAL Find Record

ObjectPAL provides a rich set of commands for finding a record with a TCursor or UIObject including:

  • locate() -  Seach for a value based on a criteria. Uses indexes as appropriate.
  • locatePattern() - Search for a pattern within a value.
  • moveToRecord() - Moves to a specific record number.
  • qLocate() - Search using currently set index.

Each of these basic find record commands has supporting commands such as locateNext() and recNo().

Syntax Example:
var
  tc TCursor
endVar
   
tc.open("Customer.db") 
if tc.locate("Name", "Proffessional Divers, Ltd.") then 
  tc.edit()
  tc.Name = "Professional Divers, Ltd."
  msgInfo("Success", "Corrected spelling error.")
endIf
tc.endEdit()

Comments

0 Comments.
Share a thought or comment...
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P187A1
Enter key:
Code Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #102113 Counter
10921
Since 2/7/2010
Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


©1995-2025 Prestwood IT Solutions.   [Security & Privacy]