>- Junkprg is a program that, among other things, contains SET DATASESSION TO (l_nvariable)
It is OK to do this, but if you do not change the DS back to what is was, you have a dangling reference to the (l_nvariable) datasession. So when you close the form with that datasession, that DS remains open.
The solution is to have the following in your PRG [and anywhere else you do this]:
local lnOldDSID
lnOldDSID = set('datasession')
set datasession to (l_nvariable)
*-- do your stuff here
set datasession to (lnOldDSID)
return
Mark McCasland
Midlothian, TX USA