Hey! I'm trying to rename a table in Access through C#, and I've tried using the “SELECT * INTO new_table_name FROM old_table_name” method, but I'm afraid it is not working. My exact code is:
Yet an exception is thrown every time:
-------------------------------------------
Syntax error in FROM clause.
-------------------------------------------
It's very mysterious and I'd really appreciate your help. I'm using C# 2005 with a 2002-formatted Microsoft Access database on Windows XP. Thanks!
Code:
OleDbCommand CMD = new OleDbCommand("SELECT * INTO " + _newName + " FROM " + _oldName + ")", clsDatabase.Connection);
CMD.ExecuteNonQuery();
-------------------------------------------
Syntax error in FROM clause.
-------------------------------------------
It's very mysterious and I'd really appreciate your help. I'm using C# 2005 with a 2002-formatted Microsoft Access database on Windows XP. Thanks!
Comment