Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert fields type
Message
De
22/06/2006 09:36:49
 
 
À
22/06/2006 09:26:18
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 XP
Database:
Visual FoxPro
Divers
Thread ID:
01130716
Message ID:
01130799
Vues:
20
>thank you very much,
>Something like this should work?of course it must:).

Well, I did test it...! :-)

>>Something like this should work
>>Use dnc Exclusive
>>gnFieldcount = AFIELDS(gaMyArray)
>>For nCount = 1 To gnFieldcount
>>  If Upper(gaMyArray(nCount,1))='Q' and gaMyArray(nCount,2)='C'
>>    Wait "Converting "+gaMyArray(nCount,1) WINDOW nowait
>>    Alter table dnc alter column (gaMyArray(nCount,1)) n(10,2)
>>  EndIf
>>EndFor
>>Wait clear
>>
>>>hi,
>>>i need something as vfp example..
>>>
>>>USE dnc
>>>
>>>gnFieldcount = AFIELDS(gaMyArray)
>>>CLEAR
>>>FOR nCount = 1 TO gnFieldcount
>>>   ? gaMyArray(nCount,1)
>>>   alter(all field begin with Q to numaric type)&&& what kind of code i must write to do it?
>>>ENDFOR
>>>
>>>thanks all the time
>>>>Sorry, but I donæt have the time to give you the code. But the easiest is to read the data from the excel file into a temp cursor, and then append the data from the temp cursor into a table which you have already created with the correct structure. In semicode, which is NOT ment to work, only show you briefly:
>>>>*Read the Excel file into the cursor curtemp && Change the code you already use
>>>>Create table yourtable ... && With the structure you want
>>>>Append from dbf('curtemp')
>>>>Another approach is to use Afield() on the table, and then use Alter Table on each field which has a name beginning with q and whick is of type character.
>>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform