Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace alias name with cursorsource
Message
De
27/06/2005 19:13:04
 
 
À
24/06/2005 14:14:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
01026169
Message ID:
01026896
Vues:
17
>>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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform