Re: Why exception exporting query result on Derby ?



MikeRam wrote:
q="SELECT * FROM "+dbTable+" WHERE "+FieldName+" BETWEEN ? AND ? ORDER BY ID";
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 ?

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
.



Relevant Pages

  • Why exception exporting query result on Derby ?
    ... I use Apache Derby but, ... When i execute the attached code i receive an exception java.sql.SQLException: No input parameters. ...
    (comp.lang.java.databases)
  • Re: System.Security.SecurityException was unhandled
    ... The exception gave you the CLSID. ... the first thing to check might be whether the COM server ... assembly actually has the permission in question. ... When I execute the application I received and error message. ...
    (microsoft.public.dotnet.security)
  • Re: collecting results in threading app
    ... but execute one at the time'. ... Could a Queue help me there? ... You can take a look at papyros, a small package I wrote for hiding ... # some exception was raised when executing this job ...
    (comp.lang.python)
  • Re: CLI Exception Handling
    ... the exception, but not on the same instruction that actually generated the ... functionality does exist in win32 SEH. ... handler executes all finally blocks that were lower on the stack have ... >> really can do is make a decision to continue searching or execute the ...
    (microsoft.public.dotnet.framework.clr)
  • Re: CLI Exception Handling
    ... It is practically quite difficult to determine (in the handler block) from which IL instruction the exception was thrown. ... >> really can do is make a decision to continue searching or execute the ...
    (microsoft.public.dotnet.framework.clr)