Adjusted SQL Server reflection query to be more correct.