I am running Visual Studi开发者_如何学运维o 2010 Ultimate and SQL Server 2008 R2 Nov 2009 CTP. However, I cannot find the .dlls for Sql Server (So that I can add tables, get the databases collection, etc). Can anyone tell me where dlls are based?
Thanks
If SQL Server is installed on the machine you are running the code on, the assemblies should be there. Otherwise, they are downloadable from here:
http://www.microsoft.com/downloads/details.aspx?FamilyId=228DE03F-3B5A-428A-923F-58A033D316E1&displaylang=en
(see SMO, specifically)
On my machine, they are here:
Directory of C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies
07/10/2008 05:10 AM 566,296 Microsoft.SqlServer.Rmo.dll 1 File(s) 566,296 bytes
Directory of C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Rmo\10.0.0.0__89845dcd8080cc91
01/30/2009 02:35 PM 566,296 Microsoft.SqlServer.Rmo.dll 1 File(s) 566,296 bytes
Sql databases are normally never interacted with on such a level. All these functions can be preformed by sql queries. The oddness of your question makes it very hard for me to recommend where to start. Perhaps look at ADO and how to send queries to a database. Then look into sql syntax for modifying tables
精彩评论