>>Sir,
>>
>>objects cannot be enumerated
>
>This indicates that the FOR EACH Command is failing. Once it fails the rest fails.
>
>>What is wrong?
>
>From the error message it looks like version 6 cannot enumerate an object. So we have to do it a different way. I don't have version 6 loaded anywhere but I think this will work.
>
>
>LOCAL X
>THISFORM.DataEnvironment.CloseTables
>X = 1
>DO WHILE TYPE("THISFORM.DataEnvironment.Objects[m.X]") = "O"
> THISFORM.DataEnvironment.Objects[m.X].Alias = ;
> "c"+JUSTSTEM(THISFORM.DataEnvironment.Objects[m.X].CursorSource)
> X = m.X + 1
>ENDDO
>THISFORM.DataEnvironment.OpenTables
>
Hi Tariq,
I would prefer we kept this on UT rather than in email.
You wrote:
>>There is a CURSOR in DE entiteld 202 and its ALIAS name is _02. After applying your codes the ALIAS name should be 202 but nothing done.
>>An other method which I apply to test your codes I write following line
after your codes immediately
select c202
brow
>>ALIAS C2002 is not found.
So... Is 202.dbf open? And... if so what alias name does it have now?
You can use DISPLAY STATUS or the DataSesion window (on tool bar, I think it exists in your version.) to see what files are open. You might also just want to do LIST STATUS TO TEMP.TXT then you can MODI FILE TEMP.TXT and view the results.
I have to stress again that this is not the way I would sugest doing this. I would just name the table aliases correctly in the DE in the first place. How many tables are we talking about?