Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UDF in Browse Crashes Foxpro

Status
Not open for further replies.

baseballgem

Programmer
Oct 3, 2001
54
US
How come when I put a user define function in a browse the system "Crashes" if I try to resize the browse.

Example:
Browse fields doccode,lname,fname,fname2nd,address1,city where f_nickname(fname,fname2nd) and zip > "20000" etc...

The function f_nickname receives 2 parameters and has a dozen or so lines of code. Essentially searching through arrays and making some logical/fuzzy comparisons and it returns a .t. or .f. depending on the result.

I use to do this all the time in the DOS World version 2.x even through VFP 5.
What gives?
 
WHERE is not used with BROWSE. If you replace WHERE with FOR it should work.
 
A Browse will also crash if your UDF moves the record pointer on the table(s) in your Browse definition.

Rick
 
I meant to say Browse...for, not Browse where, must have had my SQL brain kicking in gear. Nevertheless. It crashes when I use a medium complex U.D.F.

In the UDF there are no pointers moving in databases, it is about 30 lines of code comparing elements of arrays. And the array returns a character set. (not a logical)

Browse lname,fname,fname2,city for f_nickname(fname) = f_nickname(fname2)
When I resize diagonally it crashes. I currently use VFP 7
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top