Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
How do I change the field name of a table?
Jet SQL can change the field type, could you change the name of the field with Jet SQL?
Jet SQL cannot change field names unless you use several Jet SQL to delete the field and then insert the word
section, and then use the update query to restore the original field data for the saved temporary table.
Alternatively, you can change the Name property of the TABLE's Columns (field name) object directly with ADOX.
Function Test ()
Changetablefieldname_ado "Table 1", "AA", "Pic1"
Function Changetablefieldname_ado (Mytablename As String, Myfieldname as String, strNewName as String)
' 3 parameters:
' Mytablename string, table name
' Myfieldname string, original field name
' strNewName string, new field name
' Remember to quote ADOX first
Dim MyDB as New ADOX. Catalog
Dim MyTable as ADOX. Table
Mydb.activeconnection = CurrentProject.Connection
Set MyTable = mydb.tables (mytablename)
Mytable.columns (Myfieldname). Name = strNewName
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.