| Home | Previous Lesson: Embedded SQL - PowerBuilder Implementation Next Lesson: SELECT INTO |
SQL statements in PowerBuilder can make use of the existing variables by prefixing the variable name with a colon (:). For example, in the following code we make reference to the li_ProductNo variable in the SQL statement:
Int li_ProductNo
li_ProductNo = Integer( sle_itemno.Text )
SELECT "product_master"."item_product_description"
INTO :lProductDesc
FROM "product_master"
WHERE "product_master"."product_no" = : li_ProductNo ;
Host variables are most commonly used in the following areas:
They are also used in place of values in the SET clauses in UPDATE statements and as parameter values to the Stored Procedures.
| Home | Previous Lesson: Embedded SQL - PowerBuilder Implementation Next Lesson: SELECT INTO |