|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Rename Table Problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|