Thursday, October 22, 2015

How to find if a Column is used anywhere in the database

To get the table where this column use you can use this query.

 SELECT *  
 FROM sys.tables  
 WHERE tables.object_id IN (SELECT  
      OBJECT_ID  
 FROM sys.columns  
 WHERE columns.name LIKE '%CDRUGNAME%') -- use your column name  


C# print file on LAN Printer

If you want to print any file on network printer then you can try with this code block // Change Default Printer System.Ma...