Manipulating SQL Server using C#
How I can programmable create databases, import database images, get information abou开发者_如何学Got existing databases via C#. I am working with SQL Server 2005.
Can you refare me to some tutorial or give me some examples.
Thanks for help.
you can use SQL Server Management Object (SMO)
http://msdn.microsoft.com/en-us/library/ms162169.aspx
At the end of the day WITH SQL (though it can be encapsuled by object libraries).
Use the management studio and every action you do there can pretty much show the SQL generated. Read trhe documentation. At the end, connect ot a SQL Server and issue statements. You know, stuff like CREATE DATABASE etc. All documented.
精彩评论