PowerBuilder Function Create Dynamic DataWindow gf_create_dynamic_datawindow
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | // Function Name : gf_create_dynamic_datawindow // Argument Name : adw_control, Arg Type : Datawindow, Pass By : Reference // Return Type : (None) String ls_select String ls_where String ls_order_by String ls_dwsyntax String ls_err ls_select = "Select customer_id, companyname, contactname From Customers" ls_where = " Where region IS NOT NULL" ls_order_by = " order by customerid" ls_dwsyntax = SQLCA.SyntaxFromSQL(ls_select + ls_where + ls_order_by, "Style(Type=grid) ", ls_err) adw_control.Create ( ls_dwsynta, ls_err) If ls_err <> '' Then MessageBox("Error - Syntax", ls_err) Else adw_control.SetTransObject(SQLCA) adw_control.Retrieve() End If |
Good Luck!