SQL Property Example

The following example shows how to set the SQL property at design time:

<OBJECT CLASSID="clsid: 9381D8F2-0288-11d0-9501-00AA00B911A5" ID="ADC1">
	.
	.
	.
	<PARAM NAME="SQL" VALUE="Select Salesperson AS ColName,* from Sales">
	<PARAM NAME="Bindings" VALUE="Grid1;Edit1.Text=ColName; List1.Text=Region;">
	.
	.
	.
</OBJECT>

The following example from the Address Book sample application shows how to set the SQL property at run time in VBScript code:

SControl.SQL = "Select FirstName, LastName, " _
	& "Title, Email, Building, Room, Phone " _
	& "from Employee Where 2 < 1 for browse"