艰苦的过程:在evc中使用ADOCE的前期准备(从原来的blog转过来的)

关于开发pda的总结 windows CE 最近在开发一款pda程序,把遇到的问题总结一下。PDA开发总结一、首先是配置开发环境1.       安装步骤:ü             安装ActiveSync,微软嵌入式开发同步软件。在模拟器上调试,不需要这个软件。ü             安装EVC4,开发环境。ü             安装EVC4SP4,EVC4补丁。ü             安装ST 阅读详情

作者:liguisen

blog:http://blog.csdn.net/liguisen/

 

作者:zuilang

 

目标:evc4下在standardsdk emulator或者ppc2003用adoce3.0(或者3.1)访问sdf数据库

问题:使用evc4第一个碰到的问题就是,ADOCE3.1在哪里?怎么安装ADOCE3.1?
先来看一段SQL SERVER CE2.0的Readme:(节选)

2.3.1  Setup for eMbedded Visual Tools
1.Before you install SQL Server CE for use with the eMbedded Visual Tools development environment, you must: Install Microsoft eMbedded Visual Tools 3.0 and at least one of the following software development kits: Microsoft Windows Powered Pocket PC 2002, Pocket PC, or Handheld PC 2000.
2.Upgrade to Microsoft ActiveSync® 3.5 or later.
3.Verify that you have Administrator access on the target system and that the Administrators group has change permission on the installation directory.
Install Development Tools on the computer that you will use to develop your SQL Server CE-based applications, and install Server Tools on the computer that you will use as the server running Microsoft Internet Information Services (IIS). SQL Server CE Setup prompts you for a Development Tools or a Server Tools installation. If the development computer and the computer running IIS are the same, you can install both Development Tools and Server Tools.

1.A Development Tools installation first installs the Microsoft ActiveX® Data Objects for Windows CE (ADOCE) 3.1 components and then the SQL Server CE components. The following table shows the products and where they are installed by default.
Product                      Folder
ADOCE 3.1              C:/Windows CE Tools/Dataaccess31
SQL Server CE        C:/Program Files/Microsoft SQL Server CE 2.0
Server Tools Setup (a self-extracting executable, which can be used to configure the IIS computer)    C:/Program Files/Microsoft SQL Server CE 2.0/Redist

2.A Server Tools installation, by default, first installs Microsoft Data Access Components (MDAC) 2.6, and then the SQL Server CE components in C:/Program Files/Microsoft SQL Server CE 2.0/Server on the computer running IIS. If a later version of MDAC is already installed on the computer, the Server Tools installation does not install MDAC 2.6. Server Tools requires Microsoft Internet Explorer 5.01.

To install SQL Server CE on a Pocket PC-based, Pocket PC 2002-based, or Handheld PC 2000-based device, use either the eMbedded Visual Basic procedure or the manual procedure described in SQL Server CE Books Online. The Include and Lib files for SQL Server CE are located in the Lib and Inc subdirectories of the SQL Server CE installation directory. The Include and Lib files for OLE DB for SQL Server CE are located in the Include and Lib subdirectories of the Dataaccess31 folder. Use the Lib file that matches the processor and platform for which you are compiling.

Note  Using ADOCE through Microsoft eMbedded Visual C++® is not a supported means for accessing SQL Server CE.

装了很多次了,都没有安装ADOCE3.1(暂时的证据是整个硬盘都找不到Dataaccess31文件夹),于是我到微软上下载了这两个东西:

(1)ActiveX Data Objects for the Windows CE operating system (ADOCE) 3.1
文件名:adocepbzip.exe
地址:http://www.microsoft.com/downloads/details.aspx?FamilyID=929bb147-281c-4d6e-a727-67271075fadb&DisplayLang=en

(2)ActiveX Data Objects for the WindowsCE operating system (ADOCE) 3.1 for Windows 3.0 SDKs
文件名:adocesdkzip.exe
地址:http://www.microsoft.com/downloads/details.aspx?FamilyID=929bb147-281c-4d6e-a727-67271075fadb&DisplayLang=en

安装第一个时提示要先装PB,我没装,放弃,装第二个时提示要先装至少一个windows ce platform sdk,我已经有了standardsdk emulator还有ppc和sp(都是2003),怎么还提示我这个?又放弃。后来看readme发现:

Requirements

Windows® CE Data Access 3.1 requires the new release of Microsoft® Embedded Visual Tools. Prior to installing this SDK add-on, you must have previously installed any or all of the following Windows CE SDKs:

  • Microsoft SDK for Windows CE, Handheld PC Professional Edition 3.0
  • Microsoft SDK for Windows CE, Palm-size PC Edition 1.2
  • Microsoft Windows Platform SDK for Pocket PC

明白!

且看网友怎么说:

网友jiess(杰西)说:
装了sqlce2.0,在PC机上有adoce31,拷贝到DEVICE上,运行时,用dllregister注册一下就行了.

网友jacky_emdoor(浪子)说:
其实只需要(下载下来的安装文件里面的)/adocepb/setup/Data Access 3.1/Program Files/DataAccess31/DEVICE/ARM/SA1100/CE/RETAIL下的DLL文件拷贝到WINCE下/WINDOWS下,并且注册必要的组件,再运行你的数据库软件就可以了。

疑问:“装了sqlce2.0,在PC机上有adoce31”,我的怎么没有?/Windows CE Tools目录下没有dataaccess的目录。于是我按照jacky_emdoor(浪子)的说法去做,的确是可以注册的。

另外:
有网友说:
在evc里使用
namespace MSADOCE
{
#include <adoce31.h>
}
我编译时出现fatal error C1083: Cannot open include file: 'adoce31.h': No such file or directory
那么,如何获得这个adoce31.h?(后面会说到)

vvv_for_ever (vvvvv) 说:

1)生成adoce31.h头文件
2)用dllregster.exe注册了所有有关adoce31的dll文件
3)已经可以正确地生成connection和recordset
但是出现了如下问题:
1)当recordset调用put_ActiveConnection的时候发生如下错误:datatype misalignment
2)使用VOConnection和VORecordset时,也出现了一样的问题.
3)我将VOConnection和VORecordset中对ADO30.h的引用都改成了ado31.h,是不是这样就能完成Connection和VORecordset到ado31的过渡了?

不明白他是怎么生成adoce31.h头文件的?(后面会说到)

回过头来看看Readme,你会发现,上面说的都是evt(evc3)环境下的安装,呜呼!
于是,我在已安装evc4的情况下安装evt,结果依然。并且这个时候我发现,vc#.net的移动设备开发被破坏了,根本不能建立这样的工程。没办法,我只好都卸掉evc4和evt,然后重装evt。发现原来evt自带ppc2002。装好后,发现已经有了这样一个文件夹:/Windows CE Tools/wce300/Pocket PC 2002/dataaccess31,实在不明白,dataaccess31不是在安装SQL SERVER CE的时候才安装的吗?(而且我在安装SQL SERVER CE2.0时发现它的安装过程的确有复制adoce的东西)另外,在/Windows CE Tools/wce300/Pocket PC 2002/include里面还发现了ADOCE30这些头文件,3.0和3.1都有了???不解!

下面来看看如何获得ADOCE31.h文件,其实很简单:
先在下载下来的ADOCE3.1的安装文件里面找到adoce31.idl、adocec31.idl这两个文件,然后在命令行下执行 midl adoce31.idl就会生成ADOCE31.h了。同时,你还需要执行midl adocec31.idl来获得adocec31.h。

顺便来看一个常见的问题:

大哥,再问下! 我装好后里面就有一个Configure Connectivity Support in IIS  我再什么地方加数据库 设计表啊?是不是我装得不对 我都装了3遍了啊 !

回答:安装正确!
创建数据库的两种方法:
1.用sql语句创建
2.还可以通过isqlw20.exe来可视化创建(关于这个,请看下面)

来看看SQL Server Books Online里面的Installing SQL Server CE on a Device Using eMbedded Visual Tools

Manual Installation Process
You can manually install SQL Server CE and your eMbedded Visual Tools application on a Windows CE-based device by copying and registering all the required files. Use the following information to determine which files the application requires. Select the files appropriate for the processor type of the Windows CE-based device. To determine the processor type of the device, see the device documentation.

Application Files
On Pocket PCs, you can copy the application executable to the /Windows/Start Menu folder, and then run it from the Start menu on the device. The application executable file is located in the project tree that you create:

Microsoft eMbedded Visual Basic creates the executable file directly in the project subdirectory.
Microsoft eMbedded Visual C++® creates a separate subdirectory for each platform processor type that you want it to build. For example, MIPS processor application executables are created in /projectname/MIPSRel for the release version and /projectname/MIPSDbg for the debug version.

SQL Server CE Files
Copy the SQL Server CE files to the /Windows directory of the Windows CE-based device. These files are located in /Program Files/Microsoft SQL Server CE 2.0/Device/processor family/processor type by default. For more information about file locations and descriptions, see Installing SQL Server CE with eMbedded Visual Tools.

File                                            Requirement
Ssce20.dll                                  Required. Must be registered.
Ssceca20.dll                              Required for replication and remote data access (RDA). Must be registered.
Ssceerror20en.dll                       Optional for error messages used during development.
Isqlw20.exe                               Optional for SQL Server CE Query Analyzer.

ADOCE and OLE DB Files
Copy the SQL Server CE files to the /Windows directory on the Windows CE-based device. These files are located by default in /Windows CE Tools/dataaccess31/Windows CE OS version/processor type.

File                          Requirement
Msdaeren.dll           Optional for error messages. Msdaeren.dll is the English version of the Microsoft ActiveX  Data  Objects for Windows CE (ADOCE) error DLL and works on devices of all languages. For localized ADOCE error messages, substitute the Msdaerxx.dll that corresponds to the language setting of the device.
Adoce31.dll            Required. Must be registered.
Adoceoledb31.dll   Required.
Adoxce31.dll          Required for ADOXCE. Must be registered.

Registering the SQL Server CE Application on the Device
Use DllRegister.exe to register the DLLs that require registration. DllRegister.exe registers all the SQL Server CE, ADOCE, and OLE DB CE components on the device and warns if optional components are missing from the device. DllRegister.exe is located by default in /Program Files/Microsoft SQL Server CE 2.0/Device/processor family/processor type.

To register the SQL Server CE application

Select the appropriate version of DllRegister.exe based on the processor type of the device.
Copy DllRegister.exe from the development system to the Windows CE-based device, and then run the executable. On Pocket PCs, you can copy DllRegister.exe to the /Windows/Start menu folder, and then run it from the Start menu on the device.

Alternately, you can register the DLLs individually by using Regsvrce.exe from the Windows CE SDK or by calling the DllRegisterServer function in each DLL.

这是手工安装的过程,基本上是把相关的dll放到设备(或模拟器)当中使用DllRegister.exe注册,注意,当中有些路径可能和文档所说的有点出入,我的就不一样,例如dataaccess31的路径。还有一个要注意的是(以x86为例),在/Device/X86目录下有两个文件夹/I486和/Emulation,里面都有相同的dll,在模拟器当中应该使用/I486文件夹的(奇怪,为什么不是Emulation?),在实际设备当中没有测试过。

在ppc中,也许你还可以复制/Microsoft Visual Studio .NET 2003/CompactFrameworkSDK/v1.0.5000/Windows CE/wce300/x86下面的文件,然后在ppc中单击安装,同样会得到isqlw20.exe来可视化创建数据库。

暂时得到的结论是:

1,evt下使用ADOCE比较方便,安装ppc2002时就会安装ADOCE3.0,同时也会安装ADOCE3.1,不过,也许这些会在安装SQL SERVER CE才安装。
2,evc4下也是可以使用ADOCE3.1的,已有网友成功。估计是不需要在pc机上安装的,有网友说只需要找到相关文件(例如可以在我上面说的下载的文件里面找到)在pc机上设置好路径就可以开发,至于在设备中,可以用dllregister注册。(这个未经证实:))
3,看看吧:Note  Using ADOCE through Microsoft eMbedded Visual C++® is not a supported means for accessing SQL Server CE.看来,真的要考虑.net了。
4,绕弯路的最大原因是没有看文档,或者看了也不仔细,或者英文水平有限,不能很好的理解。其实选择微软的东西开发有一个很大的好处就是:文档齐全!

BODAS安装的安装与配置 前提:BODAS的安装需要给电脑插上Rexroth的电子狗(一个不显示的USB),才能看到exe文件 1.安装BODAS的资源选项,next后建议新建一个文件夹存储所有的资料 2.选择一个您要在其中创建程序快捷方式的开始菜单文件夹 Select the start menu folder in which you would like to create the program... 阅读详情

相关推荐

idea使用教程2017版高清完整.pdf版

idea使用教程,17年最新版本

使用ADOCE开发SQLCE数据库

使用ADOCE开发SQLCE数据库 英创公司 2009-7-7 在软件编程中,数据库始终是很重要的一部分。通过数据库,可以非常方便地存储和检索数据,极大地提高工作效率。如果我们需要存储的数据量较小,数据结构相对简单,例如个人通讯簿,则使用WinCE自带的数据库是非常合适的。如表一所示,列出了WinCE自带数据库与SQLCE数据库部分功能的对比,用户可以根据自己的需要,选择合适的数据库。关于W

xuyuefei1988的专栏 2482

IDEA 教程

IDEA教程IDEA教程IDEA教程IDEA教程IDEA教程IDEA教程

EVC4.0+AdoCe3.1访问Access数据库全攻略(附带说明及例程)

http://bbs.mscommunity.com/forums/ShowThread.aspx?PostID=26641  EVC4.0+AdoCe3.1访问Acce

Leo 1754

EVC4.0+AdoCe3.1访问Access数据库全攻略txt

EVC4.0+AdoCe3.1访问Access数据库全攻略(附带说明及例程).希望大家支持

android入门开发

NULL 博文链接:https://yuolr.iteye.com/blog/1328697

万恶的微软之ADOCE苦旅

 万恶的微软,痛苦的ADOCE~~~~ 近来一直很郁闷,都是万恶的微软闹的。当初选中VS2005平台就是看重他的高度集成性,可是猜中了这开头,却没料到这结局。早知道用EVC好了。哎~ 原来搞的一套接口是基于odbc的,忙活半天才发现,PPC平台不支持ODBC。kao!于是考虑OLE-DB,后来发现ADO.NET非常方便,心驰神往啊~。又是手忙脚乱半天,居然发现VC++MOBILE项目中死活不能#u

码农的菜园子 2689

别再为FPGA程序裸奔发愁了!手把手教你用Quartus和AES256给Altera芯片上把‘锁’

本文详细介绍了如何为Altera/Intel FPGA芯片(如Cyclone系列)构建可靠的AES256加密体系,涵盖密钥类型选择、Quartus实操到JTAG链路验证的全流程。通过硬件级AES256引擎实现配置流解密,确保FPGA程序的安全保护,适用于工业控制器等高安全需求场景。

weixin_28309571的博客 393

AI多智能体行为漂移:从涌现现象到工程化可控治理

AI智能体由大模型、提示词和上下文记忆构成,本质上是执行单元。当多个智能体通过工作流编排器协同互动时,微观上的规则遵循会在宏观上产生无法预设的群体行为,例如内部黑话、错误互证乃至目标偏移。这种涌现现象源于上下文反馈回路封闭运行,导致输入分布偏离真实用户需求。在AI智能体落地生产中,必须将其视为可控性工程问题而非模型觉醒。通过最小实验复现行为漂移,借助目标相关性、黑话占比等监控指标量化风险,并采用有状态工作流、独立审查、记忆隔离和护栏策略,可以显著降低失控概率。本文面向智能体工作流开发者,提供一套从现象识别到

cuankuangzhong6373的博客 560

新手避坑指南:用Silvaco Atlas搞定GaN HEMT电热仿真的完整流程(附代码解读)

本文详细介绍了使用Silvaco Atlas进行GaN HEMT电热特性仿真的完整流程,特别针对新手常见问题提供避坑指南。从软件环境配置、结构定义、网格划分到物理模型设置,逐步解析关键步骤,并附有代码解读和调试技巧,帮助读者快速掌握GaN器件仿真的核心技术。

weixin_29215815的博客 604

kettle多表数据迁移

点击 文件——新建——作业,在左侧的 核心对象 标签下选择 通用,双击添加一个 start ,一个 转换 ,一个 作业 和一个 成功 到右侧的作业面板,这些作业项都可以改名字。点击文件—新建—转换,在左侧的 核心对象 标签下选择 输入 下的 表输入,双击添加到右侧的转换面板,再选择 作业 下的 复制记录到结果 ,双击添加到右侧的转换面板。新建转换,在左侧的 核心对象 标签下选择 作业 下的 从结果获取记录,双击添加到右侧的转换面板,再选择 作业 下的 设置变量 ,双击添加到右侧的转换面板。

u014061745的博客 1348

PPC中注册 ADOCE3.1,sqlce(转)

PPC中注册 ADOCE3.1,sqlce      由于有一些PPC中使用的是ADOCE3.0的方式访问数据库的,如果仅仅把数据库的连接方式改为ADOCE.Connection.3.0,的话,程序能编译通过,数据库也能正常打开,但就是执行SQL语句的时候报错。    经过研究发现,使用前面提到的Access连接方法后,最终是不能使用ADOCE3.0的方法连接,但连接方法改为ADO

Richard的专栏 1138

Verilog-asm小练习—PLL建模

Verilog- ams是Verilog标准的模拟混合信号语言,以下是对PLL建模的一种思路参考

weixin_44700185的博客 1023
上一篇: 学习Win CE(使用EVC4开发)碰到的几个典型问题
下一篇: 让pc启动像电视一样快
liguisen
博客等级 码龄21年 31粉丝 54原创
评论 3
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值