Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Columns
Message
From
28/10/2002 15:12:36
 
 
To
28/10/2002 15:02:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00716154
Message ID:
00716164
Views:
17
Billy
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE Customer     && Open customer table

gnFieldcount = AFIELDS(gaMyArray)  && Create array
CLEAR
FOR nCount = 1 TO gnFieldcount 
   ? gaMyArray(nCount,1)  && Display field names
ENDFOR
This will list the field, and you can check if the field you r looking is present if not add the field

HTH

>Hello all,
>
>I need code that will do the following:
>
>1. Check to see if a column (field) exists in a table.
> 1a. If the column does exist, then exit.
> 1b. If the column does NOT exist, then add the column to the table.
>
>
>Any help will be appreciated.
>Thanks,
>Billy
Previous
Reply
Map
View

Click here to load this message in the networking platform