Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Databases > Re: Why excepti...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 3736 of 3876
Post > Topic >>

Re: Why exception ex****ting query result on Derby ?

by =?ISO-8859-1?Q?Arne_Vajh=F8j?= <arne@[EMAIL PROTECTED] > Apr 27, 2008 at 11:02 AM

MikeRam wrote:
> q="SELECT * FROM "+dbTable+" WHERE "+FieldName+" BETWEEN ? AND ? ORDER 
> BY ID";
> q="CALL SYSCS_UTIL.SYSCS_EX****T_QUERY('"+q+"','"+OutFile+"', null, null,

> null)";
> stm=cn.conn.prepareStatement(q);
> stm.setString(1, sd.StringDataOraInizio);
> stm.setString(2, sd.StringDataOraFine);
> stm.executeUpdate();
> 
> 
> I use Apache Derby but,
> When i execute the attached code i receive an exception 
> java.sql.SQLException: No input parameters.
> 
> The same query in other point of my program do not produce an exception.
> Maybe i can't use system procedure with parameter ?

Stored procedures are called via CallableStatement not
PreparedStatement. And with a slightly different syntax.

And I don't think you can use parameters inside '' as you attempt
to do.

Arne
 




 4 Posts in Topic:
Why exception exporting query result on Derby ?
MikeRam <ing.ramundo@[  2008-04-27 16:30:27 
Re: Why exception exporting query result on Derby ?
=?ISO-8859-1?Q?Arne_Vajh=  2008-04-27 11:02:28 
Re: Why exception exporting query result on Derby ?
MikeRam <ing.ramundo@[  2008-04-27 17:27:12 
Re: Why exception exporting query result on Derby ?
=?ISO-8859-1?Q?Arne_Vajh=  2008-05-12 18:50:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 22:27:58 CST 2008.