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.8: IBM extensions to JSP .91 syntax >
4.2.2.3.8.2: JSP .91 syntax: JSP tags for database access >
4.2.2.3.8.2.3a: Example: JSP .91 syntax: <DBQUERY> tag syntax

4.2.2.3.8.2.3a: Example: JSP .91 syntax: <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 <INSERT> tag to embed a variable data field. The value of that field is based on user input.

<dbquery id="empqs" connection="conn" >
select * from Employee where WORKDEPT='<INSERT requestparm="WORKDEPT"></INSERT>'
</dbquery>

Go to previous article: JSP .91 syntax: <DBQUERY> tag Go to next article: JSP .91 syntax: <DBMODIFY> tag syntax

 

 
Go to previous article: JSP .91 syntax: <DBQUERY> tag Go to next article: JSP .91 syntax: <DBMODIFY> tag syntax