<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Sue Loh's blog : CE Databases</title><link>http://blogs.msdn.com/sloh/archive/tags/CE+Databases/default.aspx</link><description>Tags: CE Databases</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>More CE database Q&amp;A</title><link>http://blogs.msdn.com/sloh/archive/2005/04/11/407282.aspx</link><pubDate>Mon, 11 Apr 2005 20:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:407282</guid><dc:creator>sloh</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/sloh/comments/407282.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sloh/commentrss.aspx?PostID=407282</wfw:commentRss><description>&lt;P class=MsoPlainText&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;Posting some questions I received from my blog.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;&lt;FONT face=Arial&gt;1. You mentioned the that the maximum size of an object store is 256MB. Which versions of Windows CE does this apply, Windows Mobile 2003, Pocket PC 2002?&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;It applies to all versions of Windows CE.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;&lt;FONT face=Arial&gt;2. Do the limitations of database in the object store apply to databases created in the filesystem?&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;Databases in the object store cannot exceed CEDB_MAXNUMRECORDS (=64K) records.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Database volumes (files containing databases) cannot exceed 16MB and the databases inside those volumes still cannot exceed CEDB_MAXNUMRECORDS records.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;&lt;FONT face=Arial&gt;3. Is there a maximum size of a database record in an Object Store? If yes what is it?&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;&lt;FONT face=Arial&gt;4. Is there a maximum size for a field in a database record? If yes what is it?&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;For both the object store and database volume files, one record cannot have more than CEDB_MAXRECORDSIZE bytes (=128KB), and one property value cannot exceed CEDB_MAXPROPDATASIZE bytes (a little short of 64KB).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;Be careful of the CEDB terminology difference compared to other database engines: A CEDB "database volume" is a "database" to other engines, and a CEDB "database" is a "table" to other engines.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;The database volumes were created to let you store your data in a file instead of in the object store, so you can think of the object store as just a special-case "default" database volume.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText&gt;&lt;FONT face=Arial size=2&gt;&lt;U&gt;If you are running into these size limitations, you are probably far better off with SQL-CE than CEDB.&lt;/U&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Or with a new offering (as of CE 5.0), EDB, which is a trimmed-down version of SQL that presents a programming interface very similar to CEDB for easy porting.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;CEDB has very poor performance once you go over ~1000 records.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=407282" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sloh/archive/tags/CE+Databases/default.aspx">CE Databases</category></item><item><title>ADOCE 3.1 and PPC 2003</title><link>http://blogs.msdn.com/sloh/archive/2004/09/01/224213.aspx</link><pubDate>Wed, 01 Sep 2004 23:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:224213</guid><dc:creator>sloh</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/sloh/comments/224213.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sloh/commentrss.aspx?PostID=224213</wfw:commentRss><description>&lt;p&gt;So, now that I've posted a message saying it's not possible to use the two together, I found a newsgroup post that says otherwise.&lt;/p&gt; &lt;p&gt;&lt;a href="http://groups.google.com/groups?q=About+ADOCE3.1+installing+on+PPC+2003+group:microsoft.public.windowsce.*&amp;amp;hl=en&amp;amp;lr=&amp;amp;ie=UTF-8&amp;amp;group=microsoft.public.windowsce.*&amp;amp;c2coff=1&amp;amp;selm=A97B44E8-BB4A-4380-8BB9-0725FB993B37%40microsoft.com&amp;amp;rnum=1"&gt;http://groups.google.com/groups?q=About+ADOCE3.1+installing+on+PPC+2003+group:microsoft.public.windowsce.*&amp;amp;hl=en&amp;amp;lr=&amp;amp;ie=UTF-8&amp;amp;group=microsoft.public.windowsce.*&amp;amp;c2coff=1&amp;amp;selm=A97B44E8-BB4A-4380-8BB9-0725FB993B37%40microsoft.com&amp;amp;rnum=1&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I haven't tried this myself to see if it really works.&amp;nbsp;&amp;nbsp;I still think&amp;nbsp;the Windows Mobile team&amp;nbsp;recommends you don't do this -- you should still strongly consider migrating over to SQL-CE.&lt;/p&gt; &lt;p&gt;Sue&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=224213" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sloh/archive/tags/CE+Databases/default.aspx">CE Databases</category></item><item><title>Common CE database questions</title><link>http://blogs.msdn.com/sloh/archive/2004/05/27/143080.aspx</link><pubDate>Thu, 27 May 2004 17:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:143080</guid><dc:creator>sloh</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/sloh/comments/143080.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sloh/commentrss.aspx?PostID=143080</wfw:commentRss><description>&lt;P&gt;&lt;STRONG&gt;Q: Is it possible to use the CEDB APIs (CeMountDBVol, CeOpenDatabaseEx, etc) to open an existing database (.cdb file), and then read records from it?&amp;nbsp; Or must I use ADOCE?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;If the database was created using ADOCE, then you should use ADOCE to access it. The CEDB APIs *can* be used to access the database, but the problem is that ADOCE stores additional "meta-data" in the database that you may mess up by doing it that way. Accessing ADOCE databases via the CEDB APIs just breaks an abstraction barrier that might cause you problems.&amp;nbsp; If the database was not created using ADOCE, then you cannot use ADOCE to access it, because it will be lacking the meta-data that ADOCE needs.&amp;nbsp; [I wish Microsoft had set forth a convention whereby you could tell the difference between ADOCE CEDB databases and normal CEDB databases.&amp;nbsp; Alas, everyone started copying the ADOCE convention of using a &amp;#8220;.cdb&amp;#8220; extension.]&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q: Can I really access ADOCE databases from eVC++?&amp;nbsp; The documentation is really lacking and the sample code is confusing.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;I wish I could help you with your problems using ADOCE, but really my expertise is in the CEDB APIs, not the ADOCE layer wrapped on top of them. &amp;nbsp;(Sometimes I can make educated guesses about what the ADOCE layer is doing.)&amp;nbsp; It does seem that a lot less consideration was given to C++ users than VB users when it comes to the ADOCE support and documentation. I do suggest posting questions on newsgroups like microsoft.public.windowsce.app.development or microsoft.public.windowsce.embedded.vc. There are a few knowledgeable newsgroup users out there who answer database questions.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q:&amp;nbsp;How do&amp;nbsp;I use ADOCE 3.1 with CE 4.x / PocketPC 2003?&amp;nbsp; I can't even seem to install it.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;ADOCE only supports CE 3.0 and earlier, which corresponds to PocketPC and PocketPC 2002.&amp;nbsp; Older ADOCE applications developed for earlier operating systems should still run on the newer OS, but you cannot&amp;nbsp;use those tools to develop applications for the newer OS.&amp;nbsp; For CE 4.x and PocketPC 2003, my understanding is that you need to use ADO .NET with Visual Studio .NET 2003.&amp;nbsp; And make sure to read the next Q/A.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q: When I use ADO .NET to build database applications for CE 4.x / PocketPC 2003, how do I create a CEDB database?&amp;nbsp; It only seems to let me use SQL-CE.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;You can't.&amp;nbsp; They (ADO)&amp;nbsp;dropped support for CEDB.&amp;nbsp; :-(&amp;nbsp; This means, your only choice for developing ADO applications that use CEDB is to develop using the CE 3.0 / PocketPC / PocketPC 2002 tools (eg. eVC 3.0) with ADOCE.&amp;nbsp; Your application should work on newer OS versions but you have to use the old tools.&amp;nbsp; Probably you are just best off switching to SQL-CE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=143080" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sloh/archive/tags/CE+Databases/default.aspx">CE Databases</category></item></channel></rss>