Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ALTER TABLE gives error 2031
Message
 
 
À
06/10/2014 07:26:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01608825
Message ID:
01608831
Vues:
40
I agree with Thierry. Why do you need to do extra work when you can select all the columns you need and create extra column on the fly.

>I have a program that runs in Unattended Mode using SYS(2335). Occasionally (this weekend 5 out of 56 runs) an ERROR 2031 occurs on an ALTER TABLE line, mostly the last one hereunder. Error 2031 is: User-interface operation not allowed at this time.
>
>It is my impression that this is a VFP-error. In debugging mode it does not occur and the variable m.lcExportAlias is fine.
>
>Can it be that I should use the full table name - DBF() - rather than the alias? Any other suggestion?
>
>
*  These are sections, not the whole code.
>*
>lcTMPFile  = m.P_TempDir + TempName() + '.DBF'
>select * from EmpS0 into table "&lcTMPFile."
>lcExportAlias = alias()
>
>use in select( m.lcExportAlias )
>use ( m.lcTMPFile ) exclusive		&& It is a TABLE, not a cursor!
>lcExportAlias = alias()
>
>alter table ( m.lcExportAlias ) ;
>	drop mutdate ;
>	drop muttime ;
>	drop thesource
>
>alter table ( m.lcExportAlias ) alter COLUMN reason C(15)
>
>alter table ( m.lcExportAlias );
>	add EmpName 	C( cnMAXLenForName );
>	add EmpIndVol 	C( cnMAXLenForIndVol )
>
>alter table ( m.lcExportAlias ) alter column empno C(5)
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform