Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alter Table - Bugs?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00495124
Message ID:
00495196
Vues:
13
Dan,

Jean-Rene's idea is a way to go. If you need Memo fields or integer fields, you can create a cursor with necessary structure, add one empty record, when do your select like:
select MyTable.*, myTempCursor.* from MyTable, myTempCursor where ...
Another tip related with ALTER Table command: don't do each command one by one, write it as one long command to save execution time. The maximum number of fileds, which can be handled by single ALTER TABLE command is limited, though. Based on experience we set it
#define ALTER_MAXFLDS 20
Hope this helps.

>Hi Dan,
>I naver use Alter table. I use the Select SQL to do the same thing because it faster.
>
>Ex:
>
>Use OldTable
>Select *,;
>       space(10) as NewCfield1,;
>       000000.00 as NewNField2,;
>       {} as NewDField3;
>       from Oldtable ;
>       into table NewTable
>
>
>This is faster then using a Alter Table...
>

>>Has anyone heard of issuing a number of alter tables against a table that has been created by a "Select ... Into Table ... " causing problems or bombing out.
>>
>>The table I create is about 178000 records.
>>I then re-open the table exclusively.
>>
>>I issue the following
>>1. Alter Table ...
>>2. Alter Table ...
>>3. Alter Table ...
>>4. Alter Table ...
>>5. Alter Table ...
>>
>>Sometimes the program bombs on .
>>Sometimes the program bombs on .
>>Sometimes the program works fine.
>>
>>In one example with a step on inside of my Error method, the table has been closed sometime between line 3 and line 4.
>>
>>I thought I was dealing with an out of memory problem but I am now logging the memory right after the error and the memory seems fine.
>>
>>The program works fine on small data sets. I have never seen problems with the smaller data sets. But with the large data set, about 1 out of every 3 runs, the program fails.
>>
>>I am running VFP 6.0 SP3 on a Windows NT Server SP4.
>>I have been able to duplicate the problem running an app within FoxPro.
>>
>>Please Help!!!!!!!!!
>>
>>TIA
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform