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.4a: Example: JSP .91 syntax: <DBMODIFY> tag syntax

4.2.2.3.8.2.4a: Example: JSP .91 syntax: <DBMODIFY> tag syntax

In the following example, a new employee record is added to a database. The values of the fields are based on user input from this JSP and referenced in the database commands using <INSERT> tags.

<dbmodify connection="conn" >
insert into EMPLOYEE
(EMPNO,FIRSTNME,MIDINIT,LASTNAME,WORKDEPT,EDLEVEL)
values
('<INSERT requestparm="EMPNO"></INSERT>',
'<INSERT requestparm="FIRSTNME"></INSERT>',
'<INSERT requestparm="MIDINIT"></INSERT>',
'<INSERT requestparm="LASTNAME"></INSERT>',
'<INSERT requestparm="WORKDEPT"></INSERT>',
<INSERT requestparm="EDLEVEL"></INSERT>)
</dbmodify>

Go to previous article: JSP .91 syntax: <DBMODIFY> tag syntax Go to next article: Example: JSP .91 syntax: <INSERT> and <REPEAT> tags

 

 
Go to previous article: JSP .91 syntax: <DBMODIFY> tag syntax Go to next article: Example: JSP .91 syntax: <INSERT> and <REPEAT> tags