Re: Why exception exporting query result on Derby ?
- From: MikeRam <ing.ramundo@xxxxxxxxxx>
- Date: Sun, 27 Apr 2008 17:27:12 +0200
MikeRam wrote:
q="SELECT * FROM "+dbTable+" WHERE "+FieldName+" BETWEEN ? AND ? ORDER BY ID";Even with this syntax i receive the same exception
q="CALL SYSCS_UTIL.SYSCS_EXPORT_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 ?
Thanks
stm=cn.conn.prepareCall(q);
stm.setString(1, sd.StringDataOraInizio);
stm.setString(2, sd.StringDataOraFine);
stm.execute();
Parametric query are usable in stored procedure
as i see from ref guide:
CallableStatement cs = conn.prepareCall
("CALL SYSCS_UTIL.SYSCS_COMPRESS_TABLE(?, ?, ?)");
cs.setString(1, "US");
cs.setString(2, "CUSTOMER");
cs.setShort(3, (short) 1);
cs.execute();
.
- References:
- Why exception exporting query result on Derby ?
- From: MikeRam
- Why exception exporting query result on Derby ?
- Prev by Date: Re: Why exception exporting query result on Derby ?
- Next by Date: Connection to Db
- Previous by thread: Re: Why exception exporting query result on Derby ?
- Next by thread: Connection to Db
- Index(es):
Relevant Pages
|
|