Hi all-
For some reason, when my program gets to the code below, VFP 7 says Not Responding when I look in the task list of windows. I can run in a separate .prg and it works, but when run from a form, it hangs. In the code below, I have a 1 field table that contains primary keys of another table. It is supposed to skip through this key table and select all from the other tablesthat have that 'key' as their primary key.
Select altcodes
Do While !Eof() && going through key table here
Wait Window "Building Report..." Nowait
tempno = altcodes.selcode
rptmsg1 = "CURRENT LICENSES BY CLASS CODE"
rptmsg2 = ""
Select Distinct olmast.busname1, olmast.busname2, olmast.busstnum, ;
olmast.busstreet, olmast.busdir, olmast.busunit, ;
olmast.buscity, ;
olmast.buszip, olmast.no_solicit, olmast.busphone, ;
olmast.establishd, olmast.mailname1, olmast.mailname2, ;
olmast.mailstnum, olmast.mailstreet, olmast.maildir, ;
olmast.mailunit, ;
olmast.mailcity, olmast.mailstate, olmast.mailzip, ;
olaccts.Desc, olowner.ownfirst, olowner.ownmi, ;
olowner.ownlast, olowner.owntitle ;
FROM olmast, olaccts, olowner, olcontrl ;
WHERE (olmast.lyear_pd = olcontrl.curr_yr And ;
olaccts.account = olmast.account And olaccts.current = .t. and ;
olowner.account = olmast.account And ;
olmast.purge <> .T. And ;
!Empty(tempno) And olaccts.code = tempno);
ORDER By olmast.busname1 ;
INTO Table selcodes.Dbf && table made on the fly....
Select 0
Use who + "temp.Dbf" Again
Append From selcodes && add records for this key to final table who + "temp.dbf"
Select altcodes
Skip
Enddo
Can anyone see why VFP 7 would hang on this select statement?
Please let me know if you do- thanks
angie
For some reason, when my program gets to the code below, VFP 7 says Not Responding when I look in the task list of windows. I can run in a separate .prg and it works, but when run from a form, it hangs. In the code below, I have a 1 field table that contains primary keys of another table. It is supposed to skip through this key table and select all from the other tablesthat have that 'key' as their primary key.
Select altcodes
Do While !Eof() && going through key table here
Wait Window "Building Report..." Nowait
tempno = altcodes.selcode
rptmsg1 = "CURRENT LICENSES BY CLASS CODE"
rptmsg2 = ""
Select Distinct olmast.busname1, olmast.busname2, olmast.busstnum, ;
olmast.busstreet, olmast.busdir, olmast.busunit, ;
olmast.buscity, ;
olmast.buszip, olmast.no_solicit, olmast.busphone, ;
olmast.establishd, olmast.mailname1, olmast.mailname2, ;
olmast.mailstnum, olmast.mailstreet, olmast.maildir, ;
olmast.mailunit, ;
olmast.mailcity, olmast.mailstate, olmast.mailzip, ;
olaccts.Desc, olowner.ownfirst, olowner.ownmi, ;
olowner.ownlast, olowner.owntitle ;
FROM olmast, olaccts, olowner, olcontrl ;
WHERE (olmast.lyear_pd = olcontrl.curr_yr And ;
olaccts.account = olmast.account And olaccts.current = .t. and ;
olowner.account = olmast.account And ;
olmast.purge <> .T. And ;
!Empty(tempno) And olaccts.code = tempno);
ORDER By olmast.busname1 ;
INTO Table selcodes.Dbf && table made on the fly....
Select 0
Use who + "temp.Dbf" Again
Append From selcodes && add records for this key to final table who + "temp.dbf"
Select altcodes
Skip
Enddo
Can anyone see why VFP 7 would hang on this select statement?
Please let me know if you do- thanks
angie