Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.databases > #39

Re: Why exception exporti

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "=?ISO-8859-1?Q?Arne_Vajh=" <=?iso-8859-1?q?arne_vajh=@THRWHITE.remove-dii-this>
Subject Re: Why exception exporti
Message-ID <48149584.5020709@vajhoej.dk> (permalink)
X-Comment-To MikeRam
Newsgroups comp.lang.java.databases
In-Reply-To <d60Rj.67$VM2.30@nntpserver.swip.net>
References <d60Rj.67$VM2.30@nntpserver.swip.net>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 31
Date Wed, 27 Apr 2011 15:21:24 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303917684 96.60.20.240 (Wed, 27 Apr 2011 10:21:24 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:21:24 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.databases:39

Show key headers only | View raw


  To: MikeRam
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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.databases | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why exception exporting q "MikeRam" <mikeram@THRWHITE.remove-dii-this> - 2011-04-27 15:21 +0000
  Re: Why exception exporti "=?ISO-8859-1?Q?Arne_Vajh=" <=?iso-8859-1?q?arne_vajh=@THRWHITE.remove-dii-this> - 2011-04-27 15:21 +0000
  Re: Why exception exporti "MikeRam" <mikeram@THRWHITE.remove-dii-this> - 2011-04-27 15:21 +0000
    Re: Why exception exporti "=?ISO-8859-1?Q?Arne_Vajh=" <=?iso-8859-1?q?arne_vajh=@THRWHITE.remove-dii-this> - 2011-04-27 15:21 +0000

csiph-web