>******************************************************************** >* Description.......: UpdateDSLastReceiv >* Calling Samples...: >* Parameter List....: >* Created by........: Nadya Nosonovsky 11/02/2001 02:45:39 PM >* Modified by.......: Nadya Nosonovsky 11/02/2001 02:45:40 PM >******************************************************************** >local lcState, ldDate, lnSelect >ldDate = date() >lnSelect = select() >if vartype(oJC)="O" > lcState = oJC.CurState >else > lcState = "MA" >endif >select Towns.ccode, Towns.rcode, iif(m.lcState="MA",space(4),town) ; > from (oAppender.pOutputFile) tbl ; > inner join Towns on tbl.Town = Towns.town ; > group by 1, 2, 3 into cursor curTemp >scan > if seek(ccode + rcode + town +"T","DataSource","crtwntype") > replace DataSource.LastReceiv with m.ldDate in DataSource > endif >endscan >use in curTemp >select (m.lnSelect)Here is a tip I learned at WhilFest this week to close a table without getting error. Instead of this code:
if used('mytable') use in mytable endifSomeone showed this: