Java Reference
In-Depth Information
After doing so, we are prompted for the usual additional information.
Here we see the same fields we saw when we were using this tag to insert a row into
a database table. In this case the Variable Name field indicates the number of rows
that were updated by the UPDATE statement. When clicking on the OK button, the
following markup is generated in the location where we dropped the DB Update
palette item:
<sql:update var="updatedRows" dataSource="jdbc/sample">
UPDATE customer
SET zip = '22033'
WHERE name LIKE ?
</sql:update>
Since we have a parameter in our query, we need to add a <sql:param> tag inside
our <sql:update> tag:
<sql:update var="updatedRows" dataSource="jdbc/sample">
UPDATE customer
SET zip = '22033'
WHERE name LIKE ?
<sql:param value="Ensode%"/>
</sql:update>
 
Search WWH ::




Custom Search