Wild card searching using DataWindow

I tried to place wild-card (e.g. ‘%Ken%’) for the searching of records in a DataWindow through QueryMode, but couldn’t get the result. Are there any other ways to do the searching?

The best way to do searching in a DataWindow is by using the find command. The find command lets you embed most of the datawindow functions that you can normally use in an expression painter.

Therefore you can use two very powerful commands to achieve the result you are looking for. These are mainly POS and MATCH. With Pos you could say:

dw_1.Find( "Pos( name, 'ken' ) > 0", 1 , dw_1.RowCount() )

To match any case you can use:

dw_1.Find( "Pos( Lower( name ), 'ken' ) > 0", 1 , dw_1.RowCount() )

If you want to get very sophisticated, you can use the Match function which provides for wildcards, character ranges and many other features.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS