Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-11-30
7
Medium Priority
?
1,185 Views
Last Modified: 2008-02-01
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

0
Comment
Question by:Bahnass
7 Comments
 
LVL 19

Expert Comment

by:VoteyDisciple
ID: 18047241
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
 
LVL 3

Author Comment

by:Bahnass
ID: 18047367
thx dear but

CHANGE is not a reserved word in ACCESS SQL

0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 18047404
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 3

Author Comment

by:Bahnass
ID: 18047509
Don't know how to do for vb 2005
0
 
LVL 3

Author Comment

by:Bahnass
ID: 18047872
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
 
LVL 5

Accepted Solution

by:
maralans earned 2000 total points
ID: 18047910
You should probably make a request to have this question deleted and have the points refunded.
0
 
LVL 3

Author Comment

by:Bahnass
ID: 18055589
Dear maralans
Just wanted to say thank U with these 500 point
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question