Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while using SSMS 2016 : Object cannot be cast from DBNull to other types

Can anyone resolve this issue:

SQL Server Management Studio 2016 CTP3 (13.0.900.73) on a Windows 10 Laptop

  1. Object Explorer > Server > Databases > Database
  2. Right Click - Properties

Instead of getting the Database Properties dialogue box I instead get this pop-up:

TITLE: Microsoft SQL Server Management Studio

Cannot show requested dialog.


ADDITIONAL INFORMATION:

Cannot show requested dialog. (SqlMgmt)


Object cannot be cast from DBNull to other types. (mscorlib)


BUTTONS:

OK

Edit:

Issue is occuring on-Prem with both physical and virtual machines. It is also happening on Amazon RDS servers.

If I use another laptop with Win 7 and SSMS 2014 I don't get any issues.

If I remove SSMS 2016 and install SSMS 2014 I get graphics issues as SSMS 2014 dialogue boxes get distorted as I have a high definition computer and SSMS 2014 throws a shoe.

like image 607
Bill Avatar asked Dec 03 '25 07:12

Bill


2 Answers

This appears to be the same issue that is logged in this Microsoft Connect item. The fix for this issue should be available in the SSMS January preview release.

like image 111
Cpt. Monac Avatar answered Dec 04 '25 21:12

Cpt. Monac


I've seen this happen if the database is in 'Recovery' mode or the DB's files are not accessible because of permissions or something like a disconnected drive.

Agreed that the dialog they show really isn't helpful.

like image 37
Josh Avatar answered Dec 04 '25 20:12

Josh