Because... :)
I have changed the lines. They now use the full name (path + filename) instead of the alias. So far, so good. Testing continues. Le's pray. ;)
>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?
>>
>>
>>*
>>lcTMPFile = m.P_TempDir + TempName() + '.DBF'
>>select * from EmpS0 into table "&lcTMPFile."
>>lcExportAlias = alias()
>>
>>use in select( m.lcExportAlias )
>>use ( m.lcTMPFile ) exclusive
>>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)
Groet,
Peter de Valença
Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.