Using retrieval arguments

About retrieval arguments

Retrieval arguments qualify the SELECT statement associated with the DataWindow object, reducing the rows retrieved according to some criteria. For example, in the following SELECT statement, Salary is a retrieval argument defined in the DataWindow painter:

SELECT Name, emp.sal FROM Employee 
		WHERE emp.sal > :Salary

When you call the Retrieve method, you supply a value for Salary. In PowerBuilder, the code looks like this:

dw_emp.Retrieve( 50000 )

Special considerations for each environment are explained below.

When coding Retrieve with arguments, specify them in the order in which they are defined in the DataWindow object. Your Retrieve method can provide more arguments than a particular DataWindow object expects. Any extra arguments are ignored. This allows you to write a generic Retrieve that works with several different DataWindow objects.

Omitting retrieval arguments If your DataWindow object takes retrieval arguments but you do not pass them in the Retrieve method, the DataWindow control prompts the user for them when Retrieve is called.

More than 16 arguments

The Retrieve method is limited to 16 arguments in some environments.

PowerBuilder You can specify any number of retrieval arguments.

Web DataWindow You can specify a maximum of 16 arguments using the RetrieveEx method.

Web ActiveX You can specify a maximum of 16 arguments for Retrieve. If you need to specify more, use the RetrieveEx method for the Web ActiveX and pass an array where each array element is a retrieval argument.