Subject Re: How To: Write a Store Proc. for the following
Author Namit Nathwani
Hi Dorin

Thanks a lot for you help.

At 02:31 pm 19/04/2004, you wrote:
>Firebird hasn't so many programming features as VFP
>What you can do is to get what you need and do the
>evaluation/parsing/textmerge at client side

Okay but my client in this case will be Report Manager, but I guess I will
have to think from the other side. Thanks a lot.

>Something like (in VFP)
>
>SQLEXEC(nHandle, [SELECT * FROM MY_PROCEDURE(?iID, ?cFlag)],'XROW')
>cRetValue = EVALUATE(xrow.narrtemplate)
>
>If you really need dynamic parsing/concatenation to be done by
>Firebird, you need some UDFs for this.

UDF's and Store procedures are one and the same, right?


>CREATE PROCEDURE MY_PROCEDURE (
> TIID INTEGER,
> TCFLAG CHAR(1))
>RETURNS (
> FLD1 VARCHAR(250),
> FLD2 VARCHAR(250),
> FLD3 VARCHAR(250),
> NARRTEMPLATE VARCHAR(250))
>AS
>begin
> if (tcflag = 'X') then begin
> SELECT xc.fld1, xc.fld2, xc.fld3 FROM xchild xc
> WHERE xc.iPID = tiID INTO :fld1, :fld2, :fld3 ;
> SELECT n.NarrTemplate FROM NarrMaster n
> WHERE n = 'XCHILDTEMPLATE' INTO :narrtemplate ;
> SUSPEND;
> end
> if (TCFLAG = 'Y') then begin
>
> end
>end



Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
namitbn@...
___________________________________________

----------


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.659 / Virus Database: 423 - Release Date: 15/04/2004


[Non-text portions of this message have been removed]