azuredatastudio: Table Designer Error - "An error occurred while initializing the table designer: Object reference not set to an instance of an object"
Hi there
I am for some reason unable to use the Table Designer, as keep getting an “An error occurred while initializing the table designer: Object reference not set to an instance of an object” error.
Full error details: at Microsoft.Data.Tools.Sql.DesignServices.TableDesigner.TableDesigner…ctor(String connectionString, String accessToken, String schemaName, String tableName, Boolean isNewTable) at Microsoft.SqlTools.ServiceLayer.TableDesigner.TableDesignerService.CreateTableDesigner(TableInfo tableInfo) in D:\a_work\1\s\src\Microsoft.SqlTools.ServiceLayer\TableDesigner\TableDesignerService.cs:line 1545 at Microsoft.SqlTools.ServiceLayer.TableDesigner.TableDesignerService.<>c__DisplayClass13_0.<<HandleInitializeTableDesignerRequest>b__0>d.MoveNext() in D:\a_work\1\s\src\Microsoft.SqlTools.ServiceLayer\TableDesigner\TableDesignerService.cs:line 87 — End of stack trace from previous location — at Microsoft.SqlTools.ServiceLayer.TableDesigner.TableDesignerService.<>c__DisplayClass12_0`1.<<HandleRequest>b__0>d.MoveNext() in D:\a_work\1\s\src\Microsoft.SqlTools.ServiceLayer\TableDesigner\TableDesignerService.cs:line 73
This seems to be happening regardless of whether I try and create a new table or edit an existing table using the Table Designer.
Version Info: Version: 1.39.1 (user setup) Commit: 7553f799e175f471b7590302dd65c997b838b29b Date: 2022-08-30T01:11:13.047Z VS Code: 1.62.0 Electron: 13.6.6 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.19044
Apologies in advance if this has been raised already - I couldn’t find any duplicates when searching.
Many thanks
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 22 (11 by maintainers)
I also had the error “An error occured while initializing the table designer: Failed to initialize the table model.” with the exact same Stack Trace.
The solution for me was that I didn’t have sufficient permission to create a new table. I only had db_datareader and db_datawriter but needed db_owner. After that, the error message disappeared and everything worked as expected.
@Tao4free Is table designer loading failing consistently for you? Can you also share the version info?
largeTableRowCount
used to be an optional variable but we made some changes recently and it’s no longer used.Hi there, I couldn‘t to use the Table Designer either.
Full error details:
Version Info:
SQL Server Info:
Hi there @alanrenmsft.
Thanks again for getting back to me.
Unfortunately, I am unable to provide the information requested, as I am using ADS within a corporate environment and do not have the required permissions to access the billing information nor spec of the databases we use in any detail. I am aware that we are on an Enterprise Agreement if this helps. I appreciate this is not very helpful!
I have had one of my colleagues try the same process and he has been able to access the Table Designer; however it took a very long time to load. I have noticed that when I try and open the Table Designer twice, the first time I get the error message I have mentioned, but the second time, I just get a “loading designer” spinning wheel. Nothing happens.
Is this a known issue? I am sure I have seen this elsewhere!
Cheers