tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Mahar" <DMa...@penson.ca>
Subject RE: [JSTL] How do I enter a null value with <sql:param>?
Date Wed, 19 May 2004 16:42:15 GMT
According to this post, "the case is closed" for the JSTL implementation, but I suspect that
so many JDBC drivers do not match the JDBC spec because the JDBC API documentation does not
mention how the method handles the case PreparedStatement.setObject(index, null).

http://www.mail-archive.com/taglibs-user@jakarta.apache.org/msg06989.html

Derek

-----Original Message-----
From: Keith [mailto:pdragon@pdragon.net] 
Sent: May 19, 2004 10:28 AM
To: taglibs-user@jakarta.apache.org
Subject: Re: [JSTL] How do I enter a null value with <sql:param>?


This was on the Users list and was my problem. But mine had to do specifically with the 
<sql:dateParam> and the Oracle JDBC driver. The regular <sql:param> worked fine
for me 
when I passed it a null value. 

Link to the starting thread in the archive: 
http://www.mail-archive.com/taglibs-user@jakarta.apache.org/msg06748.html 

Keith 



---------- Original Message -----------
From: Wolfgang Röckelein <wolfgang.roeckelein@wiwi.uni-regensburg.de>
To: Tag Libraries Users List <taglibs-user@jakarta.apache.org>
Sent: Wed, 19 May 2004 16:05:14 +0200
Subject: Re: [JSTL] How do I enter a null value with <sql:param>?

> Derek Mahar wrote:
> 
> > Your solution is equivalent to Case 2 that I listed in my original 
> > message.  The Microsoft SQL Server JDBC driver complains with a
> > JspException:
> > 
> > javax.servlet.ServletException: javax.servlet.jsp.JspException: 
> >   INSERT INTO tblTest(a) VALUES (?)
> > : [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Syntax error
> > converting the nvarchar value 'null' to a column of data type int.
> > 
> > However, the JDBC driver accepts and correctly processes the 
> > following
> > query:
> > 
> > <sql:update>
> >   INSERT INTO tblTestDerek VALUES (null)
> > </sql:update>
> > 
> > In light of this, I suspect that there may be an error in the 
> > implementation of <sql:param> where it treats "null" as a string 
> > argument rather than as an SQL null argument.
> 
> Please search the (user & devel) list. We discussed this problem a 
> while ago and
> came to the conclusing that this is a problem caused by the JDBC driver used. 
> The subject might have been "SQL Update problem with Dates"
> 
> Regards,
>    Wolfgang
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
------- End of Original Message -------


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org

NOTICE: This email contains privileged and confidential information and is intended only for
the individual to whom it is addressed. If you are not the named addressee, you should not
disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail
if you have received this transmission by mistake and delete this communication from your
system. E-mail transmission cannot be guaranteed to be secured or error-free as information
could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.


AVIS: Le présent courriel contient des renseignements de nature privilégiée et confidentielle
et n’est destiné qu'à la personne à qui il est adressé. Si vous n’êtes pas le destinataire
prévu, vous êtes par les présentes avisés que toute diffusion, distribution ou reproduction
de cette communication est strictement interdite.  Si vous avez reçu ce courriel par erreur,
veuillez en aviser immédiatement l’expéditeur et le supprimer de votre système. Notez
que la transmission de courriel ne peut en aucun cas être considéré comme inviolable ou
exempt d’erreur puisque les informations qu’il contient pourraient être interceptés, corrompues,
perdues, détruites, arrivées en retard ou incomplètes ou contenir un virus.  

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message