dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: PowerBuilder
Expertise: Beginner
Sep 27, 1999

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Searching for a Specific Row in a Data Store

Question:
What function do I use if I want to search a particular data store for the first letter of certain items?

For instance, I have this list:

    olule
    kamtibo
    okwi
If I search for a row beginning with the letter o, I get olule. When I use the Findnext function to go to the next row beginning with o, I end up with kamtibo! (I guess because there's an o in it.) Why don't I get okwi?

Answer:
Use the following Find command:

 
ll_Row = dw_1.Find( 'Left( colname, 1 ) = ~'o~'', 1, dw_1.RowCount() )
To find the next occurrence, repeat the command but make the start row greater than the last row found by one:
 
ll_Row ++
ll_Row = dw_1.Find( 'Left( colname, 1 ) = ~'o~'', ll_Row, dw_1.RowCount() )
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date