[Top] [Prev] [Next] [Bottom]
[Contents]
Insert, Update, and Delete Using QUERY_STRING
The Java framework supports another method for insert, update, and delete besides Form Post. This method is QUERYSTRING.
To use this method for insertion, remove the parameter line
<param name="insUrl" value=" saact='insert' ">
and add the following parameter:
<param name="insCols" value="0,1,2,3,4,5,6,7,8" >
The above indicated that 9 columns are sent in ascending order. The syntax for this parameter is the same as that for indexCols
, so the following is equivalent to the above example:
<param name="insCols"
value="au_id,au_lname,au_fname,phone,address,city,state,
country,postalcode" >
For the argument bindings, you must change the code fragments to these:
SaGetNArg(0)
SaGetNArg(1)
SaGetNArg(2)
SaGetNArg(3)
SaGetNArg(4)
SaGetNArg(5)
SaGetNArg(6)
SaGetNArg(7)
SaGetNArg(8)
Deletion Using QUERYSTRING
To use this method for delete, add the following parameter:
<param name="delCols" value="0" >
The above indicated that the first column is sent. The syntax for this parameter is the same as that for indexCols. So the following is equivalent to the above example:
<param name="delCols" value="au_id" >
For the argument binding, you must change the code fragments to:
SaGetNArg(0)
Update Using QUERYSTRING
To use this method for update, add the following parameters:
<param name="updCols" value="1,2,3,4,5,6,7,8" >
<param name="updWhere" value="0" >
The above indicated that 9 columns are sent. The au_id
column is the last column. It is being used in the where clause. Its value is the old value, before the update. The syntax for these parameter is the same as that for indexCols, so the following is equivalent to the above example:
<param name="updCols"
value="au_lname,au_fname,phone,address,city,state,country
,postalcode" >
<param name="updWhere" value="au_id" >
For the argument bindings, you must change the code fragments to these:
SaGetNArg(8)
SaGetNArg(0)
SaGetNArg(1)
SaGetNArg(2)
SaGetNArg(3)
SaGetNArg(4)
SaGetNArg(5)
SaGetNArg(6)
SaGetNArg(7)
[Top] [Prev] [Next] [Bottom]
[Contents]
info@bluestone.com
Copyright © 1997, Bluestone. All rights
reserved.