You are not using a prepared statement the way you are calling the executeQuery(String 
query) method.  You need to call one which takes no arguments and operates on the 
prepared statement.  When you pass in the string after setString() you are effectively 
not calling setString().

Thanks Dmitri - I couldn't see this one until you astutely pointed it out.

Cheers

> 
> From: Jerome Moliere <[EMAIL PROTECTED]>
> Date: 2002/02/15 Fri AM 04:19:18 EST
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-dev] Problem (Bug?) with Oracle & preparedstatement
> 
> > PreparedStatement stmt = dataSourceConnection.prepareStatement( qry,
> > ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
> > System.err.println("Lexicon id size ( PreparedStatement)= " + aLexiconId.length());
> > stmt.setString(1,aLexiconId);
> > ResultSet rset = stmt.executeQuery(qry);//this is the line appearing in the bottom 
>of the stack trace....
> 
> as far I can read, I think I used a stmt.executeQuery()
> call, isn't it?
> 
> 
> Jerome
> 
> _________________________________________________________
> View thread online: http://main.jboss.org/thread.jsp?forum=66&thread=8519
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to