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

Thanks Jaime,

I tried but not work and the error message is "table does not exist"


Jaime Escobal Wrote:

> Anna
> You should call the stored procedure as a "selectable stored procedure" this way:
>
> this is an example, I do not know the parameters you pass to the stored procedure...
>
> (Excuse my english, my native language is spanish)
>
> please try this, I wrote this by memory and in a hurry,  I can help later if you have problems.... I have a BIG dBase 2.62 app and my database server is firebird... hundreds screens of stored procedures, triggers... everthing works flawlessly
>
>
>
> db = new database()
> db.databaseName := "MyDB"
> db.loginString := "SYSDBA/masterkey"
> db.active := true
>
>
> cParameter1 = "XXXX"
> nParameter2 = 123
>
> q = new query()
> q.database := db
> q.sql := "SELECT * FROM prova_procedura('" + cParemeter1 + "',"+ nParameter2 + ")"
> q.requestLive := false
> q.active := true
>
> and you get the data this way
>
> do while not q.rowset.endOfset
>    ? q.rowset.fields["field1"].value
>    ?? q.rowset.fields["field2"].value
>    ?? q.rowset.fields["field3"].value
>    q.rowset.next()
> enddo
>
>
>
> 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
>