tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Lea <>
Subject Re: Fw: [OT]Re: <sql:param> null weirdness BACK ON TOPIC
Date Wed, 20 Aug 2003 03:43:31 GMT

Perhaps you could try this:

     INSERT INTO myTable VALUES ( ? )
     <fmt:parseDate value="${param.time}" var="myTime" type="both" />
     <sql:dateParam value="${myTime}" />

You might have to give parseDate a pattern or dateStyle/timeStyle to 
parse correctly.  Apparently the sql:dateParam is supposed to be used 
for DATE, TIME or TIMESTAMP columns.

fmt:parseDate will check for null and empty values and remove myTime 
from scope.  I hope that means myTime will be null when param.time is an 
empty string.

Jason Lea

View raw message