SSMS studio reports 'Value Cannot be null' when attempting to copy headers with no rows - by TheUrsulus

Status : 


Sign in
to vote
ID 742857 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 5/20/2012 7:55:55 PM
Access Restriction Public


In the SQL Server 2012 management studio if you run a query that returns no rows and you want to copy just the Headers you right-click and select Copy from the dropdown, you get the following error;

Value cannot be null.
Parameter name: data (System.Windows.Forms)

Sign in to post a comment.
Posted by Microsoft on 2/26/2013 at 3:51 PM
Hello TheUrsulus. You may be able to workaround this problem by using "SELECT TOP 1 <columns> FROM <tables>" and forcing the inclusion of a row in your results to enable you to copy your headers. Please let us know if this does not work for you. -Walter A Jokiel, Program Manager, SQL Server (