Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Oct 25, 2011 05:23 AM by Anindita.Basak
Participant
1869 Points
357 Posts
Oct 09, 2010 06:58 AM|LINK
Hello,
Can i use Microsoft Enterprise library with Smart Device project s in Vs2008?
I have created a SmartDevice project. & added a reference of-
Microsoft.Practices.SmartClient.EnterpriseLibrary.Data.SqlCe;
Microsoft.Practices.EnterpriseLibrary.Data;
Microsoft.Practices.EnterpriseLibrary.Common;
then did this on a sample application - >
SqlCeDatabase sqlCeDb = new SqlCeDatabase("Data Source=\\my documents\\TestSqlCeLib.sdf");
string sSql = ""; sSql = "Insert Into Test(UserName,Password) values ('" + txtUserName.Text + "', '" + txtPassword.Text + "') "; sqlCeDb.ExecuteReaderSql("Select * from Test");
but it gives me error on - The type 'System.Data.Common.DbParameter' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
what should i do?
Contributor
2448 Points
416 Posts
Oct 25, 2011 05:23 AM|LINK
Have you added the assembly in your project
system.data & reference in your code?
Thanks,
Anindita
http://anindita9.wordpress.com
Rohit Rao
Participant
1869 Points
357 Posts
Microsoft Enterprise Libnrary with SmartDevice projects
Oct 09, 2010 06:58 AM|LINK
Hello,
Can i use Microsoft Enterprise library with Smart Device project s in Vs2008?
I have created a SmartDevice project. & added a reference of-
Microsoft.Practices.SmartClient.EnterpriseLibrary.Data.SqlCe;
Microsoft.Practices.EnterpriseLibrary.Data;
Microsoft.Practices.EnterpriseLibrary.Common;
then did this on a sample application - >
SqlCeDatabase sqlCeDb = new SqlCeDatabase("Data Source=\\my documents\\TestSqlCeLib.sdf");
string sSql = "";
sSql = "Insert Into Test(UserName,Password) values ('" + txtUserName.Text + "', '" + txtPassword.Text + "') ";
sqlCeDb.ExecuteReaderSql("Select * from Test");
but it gives me error on - The type 'System.Data.Common.DbParameter' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
what should i do?
Anindita.Bas...
Contributor
2448 Points
416 Posts
Re: Microsoft Enterprise Libnrary with SmartDevice projects
Oct 25, 2011 05:23 AM|LINK
Have you added the assembly in your project
system.data & reference in your code?
Thanks,
Anindita
http://anindita9.wordpress.com