BBJSP SQL:Param Tag (Deprecated)

Description

In BBj 16.0 and higher, this tag can be used in a BBJSPBBJSP Page to specify parameters of the parent <SQL.Query> tag.

Attributes

Attribute Name

Description

Required

Expression

Data Type

type

The type of data

false

false

String

value

The parameter value

true

false

String

Remarks

None.

Example

<!DOCTYPE html/>
<%@ taglib uri='/WEB-CFG/tld/core.tld' prefix='c' %>
<%@ taglib uri='/WEB-CFG/tld/sql.tld' prefix='sql' %>
<!-- Demo of executing an SQL query -->
<html>
<head>
<title>SQL Tags</title>
</head>
<body>
<sql:query template="tpl" var="result" datasource="ChileCompany" sql="SELECT * FROM SALESREP WHERE ID=?">
<sql:param value="8" />
</sql:query>

<table width="100%">
<c:iterate data="${result}" id="item">
<c:template id="theRecord" template="${tpl}" data="${item}" /> 
<tr>
<td>${theRecord['SALESPERSON']}</td>
<td class="l">${theRecord['NAME']}</td>
<td class="l">${theRecord['ADDRESS']} ${theRecord['ADDRESS2']}</td>
<td>${theRecord['CITY']}</td>
<td>${theRecord['STATE']}</td>
<td>${theRecord['ZIP']}</td>
<td class="l">${theRecord['PHONE']}</td>
</tr> 
</c:iterate>
</table>
</body>
</html>
${theRecord['NAME']} ${theRecord['ADDRESS']} ${theRecord['ADDRESS2']} ${theRecord['CITY']} ${theRecord['STATE']} ${theRecord['ZIP']} ${theRecord['PHONE']}

See Also

BBJSP

SQL Tag Library

<SQL.Query>