>Dear all,
>How do I check whether a particular column exist in a table? Tried field() but I only know the name of the column and not the position.
>Thanks in advance.
>Yau
An alternative method to Borislav's is:
Select YourTableAlias
lnNoFields = FCOUNT()
I = 1
llFound = .F.
Do while I <= 1 lnNoFields ;
and not llFound
If FIELD( I) = lcYourColName
llFound = .T.
Else
I = I + 1
EndIf
EndDo
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.