🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.database
Article #458

Re: ProcedureDataSet and Firebird

#458
From: ivan.lusavec
Date: Sat, 17 Sep 2005 13:21
80 lines
4121 bytes
Hi!.
First of all thanx John.I didn't use your example but you made me start 
thinking.That ProcedureDataSet thought that whole native statemet 
call("SELECT * FROM PROCEDURENAME") was Procedure name.I really don't know 
why, strange.I got it working when I typed just the name of procedure in 
Proceduredataset, but then procedure returned only first row. But who cares 
since QueryDataSet component with "select * from procedure" does the job 
right, I just need to test it with parameters.So, because someone WILL 
probably have problems like me, you can try like I did, it works for me, 
when using Native Firebird syntax in QueryDataSet.
I was using Jaybird 1.5.5.
bye.


"John Moore" <jbm@microps.com> je napisao u poruci interesnoj 
grupi:4325cd70$1@newsgroups.borland.com...
> Ivan,
>
>    Actually I rarely use the ProcedureDataSet.. Mostly because it is 
> overkill for much of my use..
>
>
> I would check out the help docs section..
>
> "Stored procedures: hints & tips"
>
> There was some examples there as well as a pointer to a sample program..
>
>
> When I have needed data from a stored proc with parameters AND I want it 
> to end up in a DX component.. I generally do the following.. (I don't do 
> any GUI so that has never been an issue for me..)
>
>
>      String _sql = "{call sp_do_financecharge(?,?,?,?)}";
>      java.sql.CallableStatement _statement = null;
>      _statement = this.g_con.prepareCall(_sql);
>      _statement.setDouble(1,Double.parseDouble(arg_sRate));
>      _statement.setDouble(2,Double.parseDouble(arg_sMinChg));
>      _statement.setString(3,arg_sChgDate);
>      _statement.setString(4,arg_sPeriod);
>      ResultSet _rs = _statement.executeQuery();
>      if (_rs != null) {
>          QueryDataSet _qds = null;
>          try {
>            _qds = (QueryDataSet)this.g_database.resultSetToDataSet(new 
> QueryDataSet(), _rs);
>            return _qds;
>          } finally {
>            if ( (_qds != null) && (_qds.isOpen()) ) {
>              _qds.close();
>            }
>            _qds = null;
>          }
>      } else {
>          return null;
>      }
>
>
>
>
>
> ivan.lusavec@inet.hr wrote:
>> Hi.I have a problem with passing input parameters to Firebird procedure, 
>> more exactly I don't know how to do it at all with dataexpress 
>> components.I used procedures succesfully when there are no input 
>> parameters, although the query string is very strange, I just put name of 
>> select procedure and it is working.No "select * from procedurename", just 
>> "procedurename", so does someone now how to add a parameter to call.I am 
>> just interested in right syntax, I will find my way with setting 
>> parameter with parameterRow...That's my problem....how to paramaterize 
>> call...bye...
>
> -- 
> =============================================
> TeamB are volunteer helpers.  Please DO NOT REPLY VIA EMAIL!
> Post all questions and replies to this newsgroup ONLY
> For papers on DataExpress, Applets, JSP, and Web Development go to:
> http://www.microps.com/mps/paperFAQ.html
> ==================================================== 
Technical Details
Message-ID: <432c17fe@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4321d338@newsgroups.borland.com> <4325cd70$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1073da,dac42bce09fbfa83
X-Google-Attributes: gid1073da,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: <ivan.lusavec@inet.hr>
From: <ivan.lusavec@inet.hr>
Newsgroups: borland.public.jbuilder.database
References: <4321d338@newsgroups.borland.com> <4325cd70$1@newsgroups.borland.com>
Subject: Re: ProcedureDataSet and Firebird
Date: Sat, 17 Sep 2005 15:21:37 +0200
Lines: 82
Organization: aa
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
NNTP-Posting-Host: 213.202.84.96
Message-ID: <432c17fe@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1126963198 213.202.84.96 (17 Sep 2005 06:19:58 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail