cRAsH
|
| Posted: 05/07/2003, 1:55 PM |
|
I'm trying to change some field values in an editable grid before inserting, but the values don't change in the SQL statement.
I have custom code in the BeforeBuildInsert() function, but for some reason the Insert() function ignores my changes.
Any hints?
|
|
|
 |
cRAsH
|
| Posted: 05/07/2003, 3:10 PM |
|
Found the solution, thanks to CodeCharge Support!
In the Editable grid, the BeforeBuildInsert event is in the wrong place.
If you move it manually (ugh) to the top of the Insert() function, the changes you make in the BeforeBuildInsert will be reflected in the SQL.
function Insert()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildInsert");
$po_number = new clsSQLParameter("ctrlpo_number", ccsText, "", "", $this->po_number->GetValue(), "", false, $this->ErrorBlock);
......
$this->SQL = "INSERT INTO order_master ("
....
Hope this helps someone else.
Cheers.
|
|
|
 |
|