<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>起点博客 &#187; adoce</title>
	<atom:link href="http://xinzero.com/tag/adoce/feed" rel="self" type="application/rss+xml" />
	<link>http://xinzero.com</link>
	<description>起于学习，点与应用，一切只为更高效</description>
	<lastBuildDate>Mon, 06 Feb 2012 14:29:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ADOCE打包到WinCE NK.bin镜像中</title>
		<link>http://xinzero.com/add-adoce-files-to-nkbin.html</link>
		<comments>http://xinzero.com/add-adoce-files-to-nkbin.html#comments</comments>
		<pubDate>Sun, 21 Dec 2008 16:26:00 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[adoce]]></category>
		<category><![CDATA[nk.bin]]></category>
		<category><![CDATA[sqlce]]></category>
		<category><![CDATA[wince]]></category>

		<guid isPermaLink="false">http://xinzero.com/add-adoce-files-to-nkbin.html</guid>
		<description><![CDATA[


在WinCE下SQLCE开发初探中说明的方式只能作为调试程序之用，其实每次调试都需要配置一次也够麻烦的，下面就讲一下如何将ADOCE的dll文件打包到内核NK中，并将数据库文件存在硬盘（CF卡）上，实现数据永久保存地方法。
一、需要将ADOCE的dll库文件打包到WinCE的windows目录下
1、 在菜单的Platform下选择Setting，再选择Custom Build Actions选项卡，在Build step：下选择Pre-Make Image选择New，然后在弹出对话框中输入

copy &#60;Path&#62;\&#60;File name&#62; %_FLATRELEASEDIR%\&#60;File name&#62;
&#60;File name&#62;换成需要添加的文件    %_FLATRELEASEDIR%环境变量表示当前工程的release目录
确认后保存
2、在菜单的View下选择Parameter View，双击打开Project.bib文件进行编辑，在Files session下添加
FILES     ; Name Path Memory Type     ; &#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212; &#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;     &#60;File name&#62; $(_FLATRELEASEDIR)\&#60;File name&#62; NK&#160; S
$(_FLATRELEASEDIR)对应的目录和%_FLATRELEASEDIR%相同   例如：将D盘根目录下的adoce31.dll打包，    copy D:\ adoce31.dll [...]]]></description>
			<content:encoded><![CDATA[<p>在<a href="http://xinzero.com/wince-sqlce-dev-start.html">WinCE下SQLCE开发初探</a>中说明的方式只能作为调试程序之用，其实每次调试都需要配置一次也够麻烦的，下面就讲一下如何将ADOCE的dll文件打包到内核NK中，并将数据库文件存在硬盘（CF卡）上，实现数据永久保存地方法。</p>
<p>一、需要将ADOCE的dll库文件打包到WinCE的windows目录下</p>
<p>1、 在菜单的<strong>Platform</strong>下选择<strong>Setting</strong>，再选择<strong>Custom Build Actions</strong>选项卡，在Build step：下选择Pre-Make Image选择<strong>New</strong>，然后在弹出对话框中输入</p>
<p><a href="http://xinzero.com/wordpress/wp-content/uploads/2008/12/clip-image002.jpg"><img title="Add Files to NK.bin" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="530" alt="Add Files to NK.bin" src="http://xinzero.com/wordpress/wp-content/uploads/2008/12/clip-image002-thumb.jpg" width="545" border="0" /></a></p>
<p><strong>copy </strong>&lt;<em>Path</em>&gt;<strong>\</strong>&lt;<em>File name</em>&gt;<strong> %_FLATRELEASEDIR%\</strong>&lt;<em>File name</em>&gt;</p>
<p>&lt;<em>File name</em>&gt;换成需要添加的文件    <br /><strong>%_FLATRELEASEDIR%</strong>环境变量表示当前工程的release目录</p>
<p>确认后保存</p>
<p>2、在菜单的<strong>View</strong>下选择<strong>Parameter View</strong>，双击打开<strong>Project.bib</strong>文件进行编辑，在<strong>Files session</strong>下添加</p>
<p><strong>FILES     <br /></strong><strong>; Name Path Memory Type     <br /></strong><strong>; &#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212; &#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;     <br /></strong><strong>&lt;File name&gt; $(_FLATRELEASEDIR)\&lt;File name&gt; NK&#160; S</strong></p>
<p>$(_FLATRELEASEDIR)对应的目录和%_FLATRELEASEDIR%相同   <br />例如：将D盘根目录下的adoce31.dll打包，    <br /><strong>copy </strong>D:\ adoce31.dll<strong> %_FLATRELEASEDIR%\</strong> adoce31.dll    <br />adoce31.dll $(_FLATRELEASEDIR)\adoce31.dll&#160;&#160;&#160;&#160;&#160;&#160;&#160; NK&#160;&#160;&#160;&#160; S</p>
<p>保持对应关系一致就可以了。</p>
<p>然后Build and Sysgen(此时不必做，等后面修改完了一并Build and Sysgen)   <br />这样包含的文件默认在NK.bin的windows目录下</p>
<p>如果追加了新的文件需要重新Build and Sysgen   <br />我已经改过的project.bib和project.reg文件可以到<a href="http://www.namipan.com/d/b6c963836860ba5facce0c361cabdf71eee471d534060000" target="_blank">这里下载</a></p>
<p>二、替换掉dllregister.exe</p>
<p>每次运行dllregister.exe都会弹出一个“注册成功”的确认对话框，相当不爽。不知道如何让它静默运行，直接修改注册表完成它的功能算了。将dllregister注册之前和之后的注册表用UltraEdit比较，找出不同的写入project.reg中。</p>
<p>三、将数据库文件放入硬盘</p>
<p>NK的内核是个ROM，每次操作完之后的数据都是写入内存中，重启之后就没有了。所以必须将数据库文件放入CF上（NK.bin文件之外）。</p>
<p>在wince 的os定制中打开Catalog 中的Device Drivers\Storage Devices, 然后选择ATAPI PCI/IDE Storage Block Driver，右键选择Add to OS Design。</p>
<p>在Core OS\Windows CE devices\File Systems and Data Store\Storage Manager, 然后选择 FAT File System.右键选择Add toOS Design。然后重新Build and Sysgen。</p>
<p>CF卡的容量不要超过2G，fat16最大只能支持2G空间</p>
<p>Build and Sysgen等待完成后，将mydata.sdf（数据库文件）拷贝到CF上。在中文WinCE系统下，程序中访问数据库文件的路径为 /硬盘/mydata.sdf。</p>
<h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href="http://xinzero.com/wince-sqlce-dev-start.html" title="WinCE下SQLCE开发初探">WinCE下SQLCE开发初探</a></li><li><a href="http://xinzero.com/create-dos-startup-u-disk.html" title="如何制作U盘DOS启动盘">如何制作U盘DOS启动盘</a></li><li><a href="http://xinzero.com/evc-debug-by-ethenet-port.html" title="EVC通过网口调试WinCE设备方法">EVC通过网口调试WinCE设备方法</a></li><li><a href="http://xinzero.com/enlarge-wince-physical-memory-size.html" title="扩大WinCE可用物理内存">扩大WinCE可用物理内存</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://xinzero.com/add-adoce-files-to-nkbin.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WinCE下SQLCE开发初探</title>
		<link>http://xinzero.com/wince-sqlce-dev-start.html</link>
		<comments>http://xinzero.com/wince-sqlce-dev-start.html#comments</comments>
		<pubDate>Sun, 07 Dec 2008 04:47:23 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[adoce]]></category>
		<category><![CDATA[sqlce]]></category>
		<category><![CDATA[wince]]></category>

		<guid isPermaLink="false">http://xinzero.com/wince-sqlce-dev-start.html</guid>
		<description><![CDATA[WinCE下数据库开发可以选择两个自带的数据库，一个是EDB，另一个为SQLCE。EDB不支持SQL语句，操作几乎是靠调用API，感觉极不方便，所以没有选用。SQLCE支持简单的SQL语句，比较灵活。
SQLCE的链接MS推荐使用OLEDB，但是以前没有用过，所以没有采用这中方法，而使用了ADO方式。网上关于WinCE ADOCE的资料也比较多。主要是使用VOADO，而实际使用的时候发现并非那么好用。后来有找到了一个voado的示例程序，仿照示例搞定了。论坛需要注册才能下载，我将程序上传到了纳米盘，点击直接SqlCeExaple.rar下载。作者将voado做了修改，程序是在arm平台下的，实际x86下也可以使用。在硬件仿真条件下通过remote file viewer将文件上传到对应的目录就可以使用数据库了。如何将adoce集成到内核中，请看ADOCE打包到WinCE NK.bin镜像中。
SQLCE本身不支持top关键字，所以分页显示比较麻烦，我的解决办法是将数据全部读出来(数据记录不多)，然后通过程序控制该显示哪几条记录。上述的voado当记录为空的时候,ISEOF()函数并不能返回真，这样当没有记录的时候可能会进入死循环，为避免这种情况，读取记录之前可以先获取记录的条数，如果有记录则继续读取，没有则直接返回。
相关文章ADOCE打包到WinCE NK.bin镜像中如何制作U盘DOS启动盘EVC通过网口调试WinCE设备方法扩大WinCE可用物理内存]]></description>
			<content:encoded><![CDATA[<p>WinCE下数据库开发可以选择两个自带的数据库，一个是EDB，另一个为SQLCE。EDB不支持SQL语句，操作几乎是靠调用API，感觉极不方便，所以没有选用。SQLCE支持简单的SQL语句，比较灵活。</p>
<p>SQLCE的链接MS推荐使用OLEDB，但是以前没有用过，所以没有采用这中方法，而使用了ADO方式。网上关于WinCE ADOCE的资料也比较多。主要是使用<a title="voado" href="http://www.voscorp.com/products/developer/winmobile/voado/index.htm" target="_blank">VOADO</a>，而实际使用的时候发现并非那么好用。后来有找到了一个<a href="http://www.arm9bbs.com/thread-782-1-1.html" target="_blank">voado的示例程序</a>，仿照示例搞定了。论坛需要注册才能下载，我将程序上传到了纳米盘，点击直接<a href="http://www.namipan.com/d/30c30709b60f16c2e07ceac0fbe1ffd3e58b19d9888a0c00" target="_blank">SqlCeExaple.rar</a>下载。作者将voado做了修改，程序是在arm平台下的，实际x86下也可以使用。在硬件仿真条件下通过remote file viewer将文件上传到对应的目录就可以使用数据库了。如何将adoce集成到内核中，请看<a href="http://xinzero.com/add-adoce-files-to-nkbin.html">ADOCE打包到WinCE NK.bin镜像中</a>。</p>
<p>SQLCE本身不支持top关键字，所以分页显示比较麻烦，我的解决办法是将数据全部读出来(数据记录不多)，然后通过程序控制该显示哪几条记录。上述的voado当记录为空的时候,ISEOF()函数并不能返回真，这样当没有记录的时候可能会进入死循环，为避免这种情况，读取记录之前可以先获取记录的条数，如果有记录则继续读取，没有则直接返回。</p>
<h3  class="related_post_title">相关文章</h3><ul class="related_post"><li><a href="http://xinzero.com/add-adoce-files-to-nkbin.html" title="ADOCE打包到WinCE NK.bin镜像中">ADOCE打包到WinCE NK.bin镜像中</a></li><li><a href="http://xinzero.com/create-dos-startup-u-disk.html" title="如何制作U盘DOS启动盘">如何制作U盘DOS启动盘</a></li><li><a href="http://xinzero.com/evc-debug-by-ethenet-port.html" title="EVC通过网口调试WinCE设备方法">EVC通过网口调试WinCE设备方法</a></li><li><a href="http://xinzero.com/enlarge-wince-physical-memory-size.html" title="扩大WinCE可用物理内存">扩大WinCE可用物理内存</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://xinzero.com/wince-sqlce-dev-start.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

