Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with SET RELATION!
Message
From
03/10/1997 04:35:03
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Problem with SET RELATION!
Miscellaneous
Thread ID:
00053001
Message ID:
00053001
Views:
63
We have converted an application from FP version 2 to VFP5.0. We use SET RELATION to link two tables to display information in a listbox. When the listbox is displayed the first time everything is fine. The second time we enter this screen, the first record is read from table Functions and is used with the SEEK command to find a value in table Authority. After this SEEK has finished and table Functions is selected so that we can SKIP to the next record, the record pointer skips to the end of the Functions table and we get an "end of File encountered" error message.

SELECT Authority
GOTO TOP
SET RELATION TO
SET RELATION TO Function INTO Functions ADDITIVE
.
.
.
.
.
.
SELECT Authority

SET RELATION OFF INTO Functions
.
.
.
.
.
.

SELECT Authority
GOTO TOP

SELECT Functions
GOTO TOP

DO WHILE .NOT. EOF() .AND. i <= maxrecs

if modinst()
i = i + 1
*** codes(i) = Functions->function + ' ' + Functions->func_desc
codes(i,1) = Functions->function
codes(i,2) = Functions->func_desc
mfunction = Functions->function
SELECT Authority

If Adopt
SEEK muser + mfunction IN Authority
Else
SEEK muserid + mfunction IN Authority
Endif

*-- if an authority record exists for user then flag with "û" --*
IF FOUND() .AND. Authority->auth_flag
picked(1,i) = "û" &&CHR(251)
picked(2,i) = "û" &&CHR(251)
ENDIF
endif
SELECT Functions
SKIP

ENDDO


Regards


Mahesh
Reply
Map
View

Click here to load this message in the networking platform