Click here to Skip to main content
15,896,481 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to use
Quote:
using Microsoft.SqlServer.Management.Common;

these above namespace to run sql script like below:
FileInfo file = new FileInfo("C:\\myscript.sql");
                string script = file.OpenText().ReadToEnd();
                Server server = new Server(new ServerConnection(conn));
                server.ConnectionContext.ExecuteNonQuery(script);


but can't add the above namespace.
can anyone suggest which dll should i add.
Posted

 
Share this answer
 
CSS
references
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Common;
-------------------------------------------------
dll files are
Microsoft.SqlServer.ConnectionInfo.dll
Microsoft.SqlServer.Smo.dll
 
Share this answer
 
Comments
sahabiswarup 23-Jan-12 0:57am    
Thanks sanjay

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900