windowsce与Oracle
我正在使用VS2005,我有一个项目要为WindowsCE5构建一个应用程序,它可以连接到Oracle数据库(11g)。 这是我的密码:windowsce与Oracle,oracle,windows-ce,.net-assembly,system.data,Oracle,Windows Ce,.net Assembly,System.data,我正在使用VS2005,我有一个项目要为WindowsCE5构建一个应用程序,它可以连接到Oracle数据库(11g)。 这是我的密码: OracleConnection oConnexion = null; OracleCommand cmd = null; List<ApplicationEntity> ret = null; try { oConnexion = new OracleCon
OracleConnection oConnexion = null;
OracleCommand cmd = null;
List<ApplicationEntity> ret = null;
try {
oConnexion = new OracleConnection();
oConnexion.ConnectionString = oraConnection;
oConnexion.Open();
String sQuery = "SELECT ...";
cmd = new OracleCommand(sQuery, oConnexion);
cmd.CommandType = CommandType.Text;
cmd.Parameters.Add(new OracleParameter(":1", OracleDbType.Varchar2));
cmd.Parameters[":1"].Value = user.Badge;
OracleDataReader dr = cmd.ExecuteReader();
...
但我有一些编译错误,我不明白为什么:
The type 'System.Data.Common.DbConnection' 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'.
The type 'System.Data.CommandType' 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'.
...
你知道我如何解决这个问题吗?这行不通。不能将桌面程序集与Compact Framework一起使用。Oracle不提供CF连接器,因此我知道的唯一选择是在设备上,然后将本地数据库同步到企业数据库,或者使用商业第三方解决方案,如。Oracle.DataAccess.dll是紧凑型框架程序集还是桌面程序集?我不确定,但我猜它是桌面程序集。我试图找到Windows CE的oracle参考,但找不到。有这样的东西吗?谢谢你的帮助,我会试试DevArt的dotConnect!
The type 'System.Data.Common.DbConnection' 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'.
The type 'System.Data.CommandType' 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'.
...