ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 2nd, 2003, 08:38 AM
benseri benseri is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Israel
Posts: 102 benseri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to benseri
Rename Table Problems

I am trying to use the ALTER TABLE sql to rename a table like explained in this pages:

http://www.mysql.com/doc/en/RENAME_TABLE.html
http://www.mysql.com/doc/en/ALTER_TABLE.html

Unfortunately, as simple as it looks, it doesn't work for me....

Does anyone know maybe if this SQL comands are only availble in MYSqL? because I'm useing Access...

after I connect to my DB my sql is like this:

line11: sql = "ALTER TABLE art12 RENAME TO new202"
line12: conn.execute sql

And an error message is recived:

Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in ALTER TABLE statement.
... line 12



Any Ideas would be heplful,

Thanks,
Ben.

Reply With Quote
  #2  
Old November 3rd, 2003, 11:52 AM
jstrohofer jstrohofer is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Cincinnati, OH USA
Posts: 111 jstrohofer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 3 sec
Reputation Power: 5
If I recall correctly, there isn't a command for renaming a table in the ALTER TABLE statement.

I know in SQL Server you could execute sp_rename. However, in Access, I wouldn't be able to tell you how to rename a table through code. Unless you did a CREATE TABLE with the new name, and then copied all of the data from the old table to the new, and then a DROP TABLE on the old table.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Rename Table Problems


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway