Print Page | Close Window

Renaming Columns in ACCESS

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=4570
Printed Date: 30 March 2026 at 5:41am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Renaming Columns in ACCESS
Posted By: alanjw
Subject: Renaming Columns in ACCESS
Date Posted: 28 July 2003 at 12:14pm

Whats the sql script for renaming columns in access

i tried the SQL Server version:

alter table Tables rename column TableName to Title

but to no avail


thanks

 




Replies:
Posted By: michael
Date Posted: 28 July 2003 at 3:19pm
Using DAO, CurrentDb().TableDefs("MyTable").Fields("MyOldField").Name =
"MyNewField" will rename field MyOldField in table MyTable to MyNewField.

I'm sure the same can be done using ADOX as well.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: alanjw
Date Posted: 28 July 2003 at 3:50pm

What if you're just using plain old ADO 2.7
that is, my connection string is

set cnn = server.createobject("ADODB.connection")
cnn.open "Data Source=" & server.Mappath("database.mdb") & ";Provider = Microsoft.Jet.OLEDB.4.0;"

thanks



Posted By: alanjw
Date Posted: 28 July 2003 at 4:06pm

nevermind, i just discovered ADOX and all of its wonderful treasures

thanks anyways




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net