Subject Re: Stored Procedure
From vari <varieventuali2007@gmail.com>
Date Mon, 09 Jul 2018 07:52:24 -0400
Newsgroups dbase.getting-started

Thanks Mervyn but I must use BDE.

Mervyn Bick Wrote:

> On 2018-07-04 11:10 AM, Anna wrote:
> > Hallo,
> >
> > I need to call a stored procedure created in firebird into a dbase (Ver. 2.21) program. I call in this way
> >
> > d= new Mydb();
> > p= new StoredProc();
> > p.database = d
> > p.procedureName = "prova_procedura"
> > p.active=true
> >
> > p.params["column"].value -> return only first row but i need that return a rowset because the stored procedure return more rows
> >
> >
> > Help me please
> > Thanks
> > Anna
> >
>
> I'm using ADO in dBASE 12 to access Firebird 2.5 stored procedures but I
> presume using a standard query via the BDE should work the same way.  (I
> haven't tried using the BDE for this so this is a case of ...where
> Angels fear to tread. :-) )
>
> A screenshot of a little test form is attached.
>
> I've used the procedure name (verify_eancode) in an ADOquery's SELECT
> statement. It fetches the correct records from the table and they can be
> ordered as necessary.
>
>
>     this.ADODATABASE1 = new ADODATABASE(this)
>     with (this.ADODATABASE1)
>       left = 2.0
>       width = 10.0
>       height = 1.0
>       connectionString = "DRIVER=Firebird/InterBase(r)
> driver;DBNAME=d:\firebird_databases\dBASE_Examples.fdb;DIALECT=3;READONLY
> =true"
>       loginString = "sysdba/masterkey"
>       active = true
>     endwith
>
>     this.ADOQUERY1 = new ADOQUERY(this)
>     with (this.ADOQUERY1)
>        left = 25.0
>        width = 8.0
>        height = 1.0
>        database = form.adodatabase1
>        connected = true
>        sql = "select  * from verify_eancode order by eancode"
>        requestLive = false
>        active = true
>     endwith
>
>
> A second ADOquery fetches the main table for display and the
> executeSQL() method of a read/write ADOdatabase object is used to
> execute SQL INSERT, UPDATE or DELETE commands.
>
>
> Mervyn.
>
>
>