Maybe try this:
<xsp:logic>
String Test = request.getParameter("EMP_DEP");
if (Test != null)
{
<xsp:content>
Your esql ...
<xsp:content>
}
</xsp:logic>
-----Urspr�ngliche Nachricht-----
Von: Gustavo Mejia [mailto:[EMAIL PROTECTED]]
Gesendet am: Dienstag, 19. Juni 2001 01:04
An: [EMAIL PROTECTED]
Betreff: Re: How can I make a validation !
Wichtigkeit: Hoch
Hi everyone !!
Now my problem is: I know that my variable EMP_DEP is null, and I don't know
why is passing to the connection section.and if I add one line with:
System.out.println(" enter " + <request:get-parameter name="EMP_DEP"/>);
before star the connection, just appear "enter".
Do you know why ?? here my code !
<xsp:logic>
if (<request:get-parameter name="EMP_DEP"/> != null)
{
<esql:connection>
<esql:driver>sun.jdbc.odbc.JdbcOdbcDriver</esql:driver>
<esql:dburl>JDBC:ODBC:SQL</esql:dburl>
<esql:username>user</esql:username>
<esql:password>password</esql:password>
<esql:execute-query>
<esql:query>insert into Departamento values(
<esql:parameter type="string"><request:get-parameter
name="EMP_CLVE"/></esql:parameter>,
<esql:parameter type="string"><request:get-parameter
name="EMP_DEP"/></esql:parameter>
)
</esql:query>
</esql:execute-query>
</esql:connection>
}
</xsp:logic>
But it doesn't work, I got the message :
java.lang.Exception: XSP Java Compiler: Compilation failed for _nuevo.java
433: ')' expected.
xspParentNode = xspCurrentNode;
Could you help me ? do you know what I am doing wrong ?
Thanks in advance !!
Gustavo Mejia
INFOTEC
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>