The following simple code on the desktop platform compiles OK:
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
DbConnection conn = new SqlConnection();
However it doesn't compile in a compact framework project: "Cannot implicitly convert type 'System.Data.SqlClient.SqlConnection' to 'System.Data.Common.DbConnection'".
Reflector also indicates that the Compact Framework class doesn't inherit from DbConnection.
OK, so am I missing something here, or what was the reason that Microsoft did it differently?
Appologies, accidentally posted to the wrong forum. Have reposted here instead:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1641305&SiteID=1
No comments:
Post a Comment