<%! String dataSrcStr; %>
<%@ include file="checkDataSource.jsp" %>

<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/sqltaglib.tld" prefix="sql" %>
<HTML> 
<HEAD><TITLE>DML Sample</TITLE></HEAD>
<BODY BGCOLOR="#FFFFFF"> 
<FORM METHOD=post>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="20%">
<TR><TD>empno:</TD><TD><INPUT TYPE="text" name="empno"></TD></TR>
<TR><TD>ename:</TD><TD><INPUT TYPE="text" name="ename" value="PGUO"></TD></TR>
<TR><TD>job:</TD><TD><INPUT TYPE="text" name="job" value="CLERK"></TD></TR>
<TR><TD>sal:</TD><TD><INPUT TYPE="text" name="sal" value="2000"></TD></TR>
</TABLE>
<INPUT TYPE="submit" name="insert" VALUE="Insert"><br>
</FORM>
<HR>
Query:insert into emp(empno, ename, deptno, job, sal) values (?, ?, 20, ?, ?)
<HR>
<% if( request.getParameter("empno") != null && !request.getParameter("empno").equals("")) {
%>
<P>
empno: <%= request.getParameter("empno") %><br>
ename: <%= request.getParameter("ename") %><br>
job: <%= request.getParameter("job") %><br>
sal: <%= request.getParameter("sal") %><br>
Result:
            <HR>
            <sql:dbOpen dataSource="<%= dataSrcStr %>"  >
              <sql:dbExecute output="yes" bindParams="empno ename job sal">
                insert into emp(empno, ename, deptno, job, sal) values (?, ?, 20, ?, ?)
              </sql:dbExecute>
            </sql:dbOpen>
            <HR> 
<% }
%>
</BODY> 
</HTML> 

