posted 12/2/2011 by Vivek Thakur
We had created a Visual Studio project in C# to create SQL Server 2005 database via C# code. We were referencing these assemblies:
Microsoft.SqlServer.Management.Sdk.Sfc.dll
Microsoft.SqlServer.Smo.dll
Microsoft.SqlServer.ConnectionInfo.dll
We also added this DLL but did not reference it as we realized it was required internally by the above assemblies: Microsoft.SqlServer.SqlClrProvider.dll
We were using SQL Server 2008 locally (10.0.xx), but when we deployed these assemblies on the remote server (which had SQL Server 2005), we got an error asking us to use the 2005 specific files of these versions (9.0.xx). So we had to download the 2005 versions of these assemblies. We did that using Microsoft SQL Server 2005 Feature Pack:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=24793
Make sure you download the x64 bit version if you have 64-bit SQL Server installed. After installing this pack, we were able to copy the 9.0.xx versions of these assemblies from C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies. Once these assemblies were deployed in the /bin folder of our app, the program worked without any issues.
What kind of email newsletter would you prefer to receive from CodeAsp.Net?18