Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace alias name with cursorsource
Message
From
27/06/2005 19:13:04
 
 
To
24/06/2005 14:14:38
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01026169
Message ID:
01026896
Views:
18
>>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?
Previous
Reply
Map
View

Click here to load this message in the networking platform