Hi all-

I have a Do loop that works on a query. How do I make it so that if the selection 
doesn't exist,
it skips the do loop? This runs on a batch of many files and some of my files do not 
contain the
data in the query and I get an error message "selection cannot be accessed as a table" 
and the
whole process is halted.

The code I have now, which works great (when the query is fulfilled) is this:

Select * from LEWI04s1 where Instr(1,CFCC,"A2") Into Selection

Fetch First From Selection
Do while not EOT(Selection)
        VarObj = Selection.obj
        nRowID = Selection.ROWID
        Alter Object VarObj
                Info OBJ_INFO_PEN, change2

        update selection set obj = VarObj
                Where ROWID = nRowID
Fetch Next From Selection
'count = count + 1

Loop

Thanks for your help. This list is great.

RJ

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 12281

Reply via email to