>>Hi everyone..
>>
>>How can I verify if a field already exists in a table?...
>>Need to create it if doens´t....
>>
>>Thanks in advance
>>Carlos Burgos
>
>Carlos, here you go:
>
>llFoundIt = .F.
>lnFC = FCOUNT()
>For I = 1 to lnFC
> If FIELD( I ) = lcFieldILookFor
> llFoundIt = .T.
> EndIf
>EndFor
>
>If not llFoundIt
> ... Code to create field in table
>EndIf
>
>
>Terry
Why not get out of the loop once you found it? Though it would be using "premature exit" :)
If it's not broken, fix it until it is.
My Blog