I created a SQL database table in Visual Studio 2013. I want to rename it but the name property is disabled. How can I change the table name?
(using VS2013) I came looking on here because I had written the main table for my project this afternoon, and as usual set it's name in T-SQL. But had not realized that the name had not stuck until I went to use it in the Linq-to-SQL I tried over and over to rename it, and I had refreshed many times.
The default name 'Table', has an obvious clash problem in normal code.
Then tonight came on here to see if you guys had found a way and opened the project to try some out.
Turns out that although the original table called 'Table' was still there, I now had many copies of it, one for each attempt at renaming it.
So I think from that we can assume the table renaming problem is a bug rather than a feature, and that MS use a copy first, then should do the deete of the file that is being renamed. But also that the refresh does not work on these copies until the project is closed and then reopened. Yes I know, a bit cheesey, but at least there is a way around.
Personally, with this and the database overwrites at run time, I am starting to lean towards letting the database designer create the scripts for my program to use rather than creating the tables and other database parts. That puts everything back into your hands, which must be a good thing.
I haven't quite got to grips with doing the Linq-to-SQL manually yet, and it is such a bonus to a programmer that I have to tackle that first.