UDF in view 
Author Message
 UDF in view

I have a UDF I wrote and I want to use it in a view I'm building.  When
I type out the call line and add it to the fields in the view it gets
enclosed in quotes and comes out as a string when I run the view.

i.e.  MyFunction(tablea.field1,tablea.field2,tablea.field3) ends up as
    "MyFunction(tablea.field1,tableafield2,tablea.field3)".

The function never gets executed?!  Am I missing something?

Regards,
Doug Fritz



Sun, 27 Aug 2000 03:00:00 GMT  
 UDF in view

The view designer in VFP is aweful.  My advice... don't use it for anything
that involves tasks beyond viewing simple table data.  Use CREATE SQL VIEW
instead!

CREATE SQL VIEW MYVIEW as SELECT myfunc(parm1,parm2) as field1 FROM MYTABLE

--
D.J. Bouchier
Behind the Scenes Computer Solutions



Sun, 27 Aug 2000 03:00:00 GMT  
 UDF in view

I got past the quotes problem, but now I get an error saying the
functionname.prg does not exist. The function is part of my project and I
am calling the correct name.

Quote:

> I have a UDF I wrote and I want to use it in a view I'm building.  When
> I type out the call line and add it to the fields in the view it gets
> enclosed in quotes and comes out as a string when I run the view.

> i.e.  MyFunction(tablea.field1,tablea.field2,tablea.field3) ends up as
>     "MyFunction(tablea.field1,tableafield2,tablea.field3)".

> The function never gets executed?!  Am I missing something?

> Regards,
> Doug Fritz



Sun, 27 Aug 2000 03:00:00 GMT  
 UDF in view

If you're still using the view designer (yikes) then the problem is
probably a pathing one.  The view designer validates function calls when
you attempt to save the view.  Prior to opening the view designer, just use
SET PATH TO <FILE> to point at the directory the function resides, or SET
PROCEDURE TO <FILENAME> if the function is not a stand-alone .prg.

--
D.J. Bouchier
Behind the Scenes Computer Solutions



Sun, 27 Aug 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. REMOTE VIEWS, UDF VFP3

2. Writing an Aggregate/Set UDF?

3. Index Expressions that use functions (UDF's)

4. UDF in BROWSE

5. Activating a UDF in a

6. Assembler UDF

7. Help! scroll bars in UDF

8. Report Writer UDF Question

9. UDF you might find usefull

10. UDF's in a SET FILTER command

11. Make UDF for SQL2000

12. SELECT IIF(.T.,const,UDF()) FROM ..

 

 
Powered by phpBB® Forum Software