InfoCenter Home >
4: Developing applications >
4.2: Building Web applications >
4.2.2: Developing JSP files >
4.2.2.3: Overview of JSP file content >
4.2.2.3.7: IBM extensions to JSP syntax >
4.2.2.3.7.2: JSP syntax: Tags for database access >
4.2.2.3.7.2.3a: Example: JSP syntax: <tsx:dbquery> tag syntax

4.2.2.3.7.2.3a: Example: JSP syntax: <tsx:dbquery> tag syntax

In the following example, a database is queried for data about employees in a specified department. The department is specified using the <tsx:getProperty> to embed a variable data field. The value of the field is based on user input.

<tsx:dbquery id="empqs" connection="conn" >
select * from Employee where WORKDEPT='<tsx:getProperty name="request" property=request.getParameter("WORKDEPT") />'
</tsx:dbquery>

Go to previous article: JSP  syntax: <tsx:dbquery> tag syntax Go to next article: JSP syntax: <tsx:dbmodify> tag syntax

 

 
Go to previous article: JSP  syntax: <tsx:dbquery> tag syntax Go to next article: JSP syntax: <tsx:dbmodify> tag syntax