...
Code Block | ||
---|---|---|
| ||
var table = "productsp"; pjs.define("productsp_out", { type: 'data structure', qualified: true, dim: 50, extName: table }); pjs.define("searchQuery", { type: "char", length: 30 }); var c1; pjs.connect("*LOCAL"); pjs.clear(productsp_out); searchQuery = '%' + 'Garmin' + '%'; var c1 = pjs.prepare("select * from " + table + " where prdesc like ? order by prid"); pjs.bindParameters(c1, [ [searchQuery.trim(), pjs.SQL_PARAM_INPUT] ]); pjs.execute(c1); pjs.fetch(c1, productsp_out, 50); pjs.close(c1); pjs.disconnect(); |
...