General information
Category:
Coding, syntax & commands
Thanks, Al, for your reply. That took care of the first problem. I found the answer to the second in MSKB article Q101302.
Have a g'day!
Neil
>>I'm running into two problems that don't make sense. I'm working in VFP6 with a database designed under FPW26 consisting of free tables.
>>The database has one main table and about 15 child tables, of which no more than three have any data linked to a record in the master. The main table contains fields with values that can be used to select the necessary child table(s).
>>
>>1. I'm trying to link one table to a main table with the following:
>>
>> USE reg_main IN 0 ORDER registr_id
>> pcSport0 = "reg_"+gen_sc && Identify and open main sport table
>> && If gen_sc contains "FB", then
>> && pcSport0 becomes "reg_FB"
>> && which is the table needed
>> USE &pcSport0 IN 0 ORDER registr_id && use reg_FB
>> SET RELATION TO registr_id into &pcsport0 && link reg_main to reg_fb
>> SET SKIP TO reg_main
>>
>>The problem is that the SET RELATION instruction halts, saying "Table has no index set". Both tables are indexed on registr_id. What am I doing wrong?
>>
>>2. With Set Step ON, if I make a minor change to the code, the next time I run the program the Trace window says "Source is out of date". I can't seem to get it to run even by saving the code and shutting down VFP. There is no reference to that error message that I can find anywhere in the docs. How can I clear it?
>>
>>Thanks,
>>Neil Preston
>>
>>I'm on a super hot project with a looming deadline. Murphy thrives under these conditions.
>
>1. You need to be in the work area of the parent table before you SET RELATION. Issue SELECT Reg_Main after you USE it. USE... IN 0 opens the table in the first available work area, without selecting that table/work area. You should also use an ALIAS on the second table to make it easier to work with.
>
>USE reg_main IN 0 ORDER registr_id
>pcSport0 = "reg_"+gen_sc
>USE &pcSport0 ALIAS MyAlias IN 0 ORDER registr_id
>SELECT Reg_Main
>SET RELATION TO registr_id into MyAlias
>
>2. Can't help you here, I still use VFP5.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only