TABLE.FIELDNAME_CHANGE Function
Syntax
V FieldName_Change(C filename,C fieldnames_old,C fieldnames_new)
Arguments
- filename
The fully qualified file name of the table.
- fieldnames_old
A CR-LF delimited list of old field names.
- fieldnames_new
A CR-LF delimited list of new field names.
Description
Change the names of fields in a table without restructuring the table.
Discussion
The TABLE.FIELDNAME_CHANGE() function allows you to change field names through Xbasic. Important: If any of the fields whose name you change are included in any index expressions, those indexes will be dropped. Note : Alpha Anywhere pads the new field name with spaces to a length of 10 characters.
Example
dim old_names as C dim new_names as C old_names = "ID" + crlf()+ "Reference" new_names = "ID_Seealso" + crlf()+ "Description" table.fieldname_change("C:\Databases\Help_Database\Seealso.Dbf", old_names, new_names)
See Also