Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread dataset
Fri, Jan 17 2014 11:37 AMPermanent Link

Paul Waegemans

IMS

I have a dataset in de datasetmanager at design time with the following code

SELECT * FROM clubs
WHERE clubnaam LIKE '%JONG%'

This code retrieves the correct rows from the table with all records where clubnaam contains JONG.

So far so good but how do I change the string JONG at run time.
Fri, Jan 17 2014 2:41 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Paul,

<< I have a dataset in de datasetmanager at design time with the following
code

SELECT * FROM clubs
WHERE clubnaam LIKE '%JONG%'

This code retrieves the correct rows from the table with all records where
clubnaam contains JONG.

So far so good but how do I change the string JONG at run time.  >>

You would re-code the query like this:

SELECT * FROM clubs
WHERE clubnaam LIKE {ClubName='%JONG%'}

Only include the ='%JONG%' part if you want this string to be the default,
otherwise leave it out, like this:

SELECT * FROM clubs
WHERE clubnaam LIKE {ClubName}

In your EWB application, do this:

  ClubsDataSet.Params.Clear;
  ClubsDataSet.Params.Add('ClubName='%JONG%');
  Database.Load(ClubsDataSet);

If you have any other questions, please let me know.

Tim Young
Elevate Software
www.elevatesoft.com


Image