I know - I deserve a dope slap for this one.  ;)

But you're absolutely right - I've been trying to slow
down and be a little more careful with my query.  I
must have done something wrong with a parameter in a
previous incarnation, because now I'm getting a good
result back.

I apologize for taking your time.  Thanks for
answering.  There are no other Java folks in my
department.  Sometimes I use lists as a remote
substitute for asking someone "Can you take a look at
this?"  I appreciate the feedback very much. 
Sincerely, MOD


--- Kris Schneider <[EMAIL PROTECTED]> wrote:
> Well of course the data access stuff shouldn't be
> embedded in a JSP ;-). But it
> should still work. Actually, it sounds like you
> might have a mismatch between
> the types you're using for your input parameters and
> the column types your
> querying against. Can you build your query up param
> by param to see when you get
> one that causes the error? In other words, start
> with a query that only uses one
> input parameter. If that works, add your second and
> so on. When adding a param
> causes the error, check the type you're providing
> versus the type of the column.
> 
> Quoting Michael Duffy <[EMAIL PROTECTED]>:
> 
> > 
> > I made a bonehead error on that one, Kris.  My
> > original query had parameters in it.  When it
> failed,
> > I stripped it down to "SELECT * FROM DEFECT" - but
> in
> > my haste I forgot to remove the <sql:param> tags
> > underneath.  Once I saw that, the simple query
> worked
> > just fine.
> > 
> > Once that was working, I put back my longer SQL
> query.
> >  It's pretty long, with all those joins: 423
> chars.  I
> > can run it in that SQL testing JSP by cutting and
> > pasting into the HTML text area.
> > 
> > But when I try to run it in the app JSP, I get a
> > JSPException: "Invalid column type".
> > 
> > Is it because there's a limit on query string
> length? 
> > I believe the SQL is okay, because it runs
> properly on
> > Oracle.
> > 
> > The real answer might be that complicated SQL
> rightly
> > belongs on the server side, not in a JSP.  But I
> hoped
> > this project would fall into the category of
> simple
> > prototype.  Perhaps that's not true.
> > 
> > --- Kris Schneider <[EMAIL PROTECTED]> wrote:
> > > So you're saying something simple like:
> > > 
> > > <sql:query var="results">
> > >   SELECT * FROM DEFECT
> > > </sql:query>
> > > 
> > > is blowing up?
> > > 
> > > Quoting Michael Duffy <[EMAIL PROTECTED]>:
> > > 
> > > > 
> > > > Good check, Kris, but I did have the EL
> notation.
> > > > 
> > > > I stripped my query down (it got big with
> joins)
> > > to a
> > > > "SELECT * FROM DEFECT".  I still get an
> "invalid
> > > > column exception".  The query runs fine in
> > > Oracle's
> > > > SQL*Plus.
> > > > 
> > > > I wrote a simple JSP a while back that lets me
> > > type an
> > > > ad-hoc query into an HTML text area and
> displays
> > > the
> > > > results in a table.  It's been helpful for
> testing
> > > > connections and data source set-ups.  I can
> type
> > > > "SELECT * FROM DEFECT" into that JSP and get a
> > > table
> > > > result back. 
> > > > 
> > > > What does all this tell me?  I must need more
> > > coffee,
> > > > because I'm still not seeing what I've missed.
> > > > 
> > > > Gotta be a bonehead problem.
> > > >  
> > > > 
> > > > 
> > > > --- Kris Schneider <[EMAIL PROTECTED]> wrote:
> > > > > Are you using:
> > > > > 
> > > > > <sql:dateParam value="sinceReportDate"
> > > type="date"/>
> > > > > 
> > > > > instead of:
> > > > > 
> > > > > <sql:dateParam value="${sinceReportDate}"
> > > > > type="date"/>
> > > > > 
> > > > > Quoting Michael Duffy <[EMAIL PROTECTED]>:
> > > > > 
> > > > > > 
> > > > > > I've got a question that will turn out to
> be
> > > > > simple,
> > > > > > but I'm not seeing it.
> > > > > > 
> > > > > > I'm writing an SQL query that has a date
> > > > > parameter, so
> > > > > > I'm using the <sql:dateParam> tag nested
> > > > > underneath my
> > > > > > <sql:query> tag, with the type="date"
> > > attribute
> > > > > set.
> > > > > > 
> > > > > > "JSTL In Action" tells me that the value
> for
> > > > > > <sql:dateParam> has to be a scoped
> variable of
> > > > > type
> > > > > > java.util.Date, so I've got a
> <jsp:useBean>
> > > tag
> > > > > that
> > > > > > declares one.
> > > > > > 
> > > > > > The problem comes when I try to set the
> value
> > > of
> > > > > the
> > > > > > Date Bean.  I get a string value from an
> HTML
> > > form
> > > > > > input text, so I want to use
> <fmt:parseDate>
> > > to
> > > > > turn
> > > > > > it into a Date.  I wrap the
> <fmt:parseDate> in
> > > a
> > > > > > <c:if> tag that makes sure I only parse
> when
> > > the
> > > > > > parameter for the text box is not empty.
> > > > > > 
> > > > > > But when I run the JSP I get an exception
> back
> > > in
> > > > > the
> > > > > > browser:
> > > > > > 
> > > > > > javax.servlet.jsp.JspException: An error
> > > occurred
> > > > > > while evaluating custom action attribute
> > > "value"
> > > > > with
> > > > > > value "sinceReportDate": Attempt to
> convert
> > > String
> > > > > > "sinceReportDate" to type
> "java.util.Date",
> > > but
> > > > > there
> > > > > > is no PropertyEditor for that type (null) 
> > > > > > 
> > > > > > I'm not seeing my error.  Can anybody on
> the
> > > list
> > > > > spot
> > > > > > it?  Thanks - MOD
> > > > > 
> > > > > -- 
> > > > > Kris Schneider <mailto:[EMAIL PROTECTED]>
> > > > > D.O.Tech       <http://www.dotech.com/>
> > > 
> > > -- 
> > > Kris Schneider <mailto:[EMAIL PROTECTED]>
> > > D.O.Tech       <http://www.dotech.com/>
> 
> -- 
> Kris Schneider <mailto:[EMAIL PROTECTED]>
> D.O.Tech       <http://www.dotech.com/>
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to