NEEDED ACCESS Statment like ALTER TABLE ttt RENAME COLUMN aaa TO bbb

A very important task

I Need  to rename an access database field from VB dot net 2005

I forgot all about using DAO
if possible SQL statement
like


ALTER TABLE ttt RENAME COLUMN aaa TO bbb
that works in SQL

LVL 3
BahnassAsked:
Who is Participating?
 
maralansConnect With a Mentor Commented:
You should probably make a request to have this question deleted and have the points refunded.
0
 
VoteyDiscipleCommented:
I don't remember Access-specific DDL queries too well, but I'd guess it's:

ALTER TABLE ttt CHANGE COLUMN aaa bbb INT NOT NULL;
0
 
BahnassAuthor Commented:
thx dear but

CHANGE is not a reserved word in ACCESS SQL

0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
Arthur_WoodCommented:
you need to add a reference to the ADO Extensions for Security and Data Definition (ADOX)

then you can use the ADOX.Catalog and ADOX.Table objects

AW

0
 
BahnassAuthor Commented:
Don't know how to do for vb 2005
0
 
BahnassAuthor Commented:
Sorry I repated it
on
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_22078122.html
and had the answer

I believe the only way you can accomplish this is by:

1)  Adding a column:

ALTER TABLE yourTableName ADD COLUMN NewName datatype(size)

2)  Run an update statement to copy the data from the old column to the new one:

UPDATE yourTableName SET NewName = OldName

3)  Then drop the old column:

ALTER TABLE yourTableName DROP COLUMN OldName
0
 
BahnassAuthor Commented:
Dear maralans
Just wanted to say thank U with these 500 point
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.