⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 189-192.html

📁 WindowsCE.[Essential Windows CE Application Programming].Jon Wiley & Son.zip
💻 HTML
📖 第 1 页 / 共 2 页
字号:
			<option value="/reference/dir.programminglanguages.html">Programming
			<option value="/reference/dir.security1.html">Security	
			<!-- <option value="/reference/dir.ewtraining1.html">Training Guides -->
			<option value="/reference/dir.userinterfaces.html">UI
			<option value="/reference/dir.webservices.html">Web Services
			<option value="/reference/dir.webmasterskills1.html">Webmaster
			<option value="/reference/dir.y2k1.html">Y2K
			<option value="">-----------
			<option value="/reference/whatsnew.html">New Titles
			<option value="">-----------
			<option value="/reference/dir.archive1.html">Free Archive		
			</SELECT>
			</font></td>
	</tr>
	</table>
	</form>
<!-- LEFT NAV SEARCH END -->

		</td>
		
<!-- PUB PARTNERS END -->
<!-- END LEFT NAV -->

<td rowspan="8" align="right" valign="top"><img src="/images/iswbls.gif" width=1 height=400 alt="" border="0"></td>
<td><img src="/images/white.gif" width="5" height="1" alt="" border="0"></td>
<!-- end of ITK left NAV -->

<!-- begin main content -->
<td width="100%" valign="top" align="left">


<!-- END SUB HEADER -->

<!--Begin Content Column -->

<FONT FACE="Arial,Helvetica" SIZE="-1">
To access the contents, click the chapter and section titles.
</FONT>
<P>
<B>Essential Windows CE Application Programming</B>
<FONT SIZE="-1">
<BR>
<I>(Publisher: John Wiley & Sons, Inc.)</I>
<BR>
Author(s): Robert Burdick
<BR>
ISBN: 0471327476
<BR>
Publication Date: 03/01/99
</FONT>
<P>
<form name="Search" method="GET" action="http://search.earthweb.com/search97/search_redir.cgi">

<INPUT TYPE="hidden" NAME="Action" VALUE="Search">
<INPUT TYPE="hidden" NAME="SearchPage" VALUE="http://search.earthweb.com/search97/samples/forms/srchdemo.htm">
<INPUT TYPE="hidden" NAME="Collection" VALUE="ITK">
<INPUT TYPE="hidden" NAME="ResultTemplate" VALUE="itk-simple-intrabook.hts">
<INPUT TYPE="hidden" NAME="ViewTemplate" VALUE="view.hts">

<font face="arial, helvetica" size=2><b>Search this book:</b></font><br>
<INPUT NAME="queryText" size=50 VALUE="">&nbsp;<input type="submit" name="submitbutton" value="Go!">
<INPUT type=hidden NAME="section_on" VALUE="on">
<INPUT type=hidden NAME="section" VALUE="http://www.itknowledge.com/reference/standard/0471327476/">

</form>


<!-- Empty Reference Subhead -->

<!--ISBN=0471327476//-->
<!--TITLE=Essential Windows CE Application Programming//-->
<!--AUTHOR=Robert Burdick//-->
<!--PUBLISHER=John Wiley & Sons, Inc.//-->
<!--IMPRINT=Wiley Computer Publishing//-->
<!--CHAPTER=7//-->
<!--PAGES=189-192//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->

<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="185-189.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="192-196.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
</P>
<P><FONT SIZE="+1"><B>Searching for Records in the Phone List Database</B></FONT></P>
<P>Database applications, such as phone lists or other personal contacts, are primarily used to look up information pertaining to one or more of the records in the corresponding application database. Users of a phone list application, for example, will often want to look up the phone number of a specific person in the database.
</P>
<P>The phone list application provides basic record search capabilities. A search is invoked by selecting the Seek option from the Options menu in the main application window. The Options menu is shown in Figure 7.5. Selecting the Seek option displays the dialog box shown in Figure 7.6.</P>
<P><A NAME="Fig5"></A><A HREF="javascript:displayWindow('images/07-05.jpg',480,95 )"><IMG SRC="images/07-05t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/07-05.jpg',480,95)"><FONT COLOR="#000077"><B>Figure 7.5</B></FONT></A>&nbsp;&nbsp;The phone list application Options menu.</P>
<P><A NAME="Fig6"></A><A HREF="javascript:displayWindow('images/07-06.jpg',455,202 )"><IMG SRC="images/07-06t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/07-06.jpg',455,202)"><FONT COLOR="#000077"><B>Figure 7.6</B></FONT></A>&nbsp;&nbsp;The Seek Record dialog box.</P>
<P>This dialog lets the user enter a record property value in the text entry field. The record property that this corresponds to (e.g., first name, last name, etc.) depends on the property by which the database is currently sorted. For example, if the phone list database is sorted by last name, the seek record dialog box assumes that the user will enter a last name. This is emphasized by the wording of the caption above the edit field. Entering a last name and pressing the OK button in this case makes the application search the phone list database for a record containing the specified last name.
</P>
<P>The set of radio buttons on the left side of the dialog with the very confusing labels indicate the type of search to perform. As you read the rest of this chapter, you will see that these button labels correspond to one of the parameters of the Windows CE database search function. After reading about this function, you will see that this dialog box is useful for allowing you to see the effect of passing different parameter values to the search function.</P>
<P>For now, from the point of view of highlighting the basic database features provided by Windows CE, it is sufficient to say that these radio buttons control how the search value entered by the user is compared to the corresponding record property for each record in the database.</P>
<P>For example, let&#146;s say that a user wants to search the phone list database for the first record with a last name of Smith. The user must first make sure that the database is sorted by last name. As described above, this is done by tapping the Last Name column header.</P>
<P>Next, the user chooses the Seek menu option from the Options menu. In the dialog box that appears, the user types &#147;Smith&#148; in the edit field. The CEDB_SEEK_VALUEFIRSTEQUAL radio button is selected to tell the application to search for the first record containing a last name of Smith (see Figure 7.6). When the user presses the OK button, the phone list application searches for the requested record. If the record is found, the results of the search are displayed in the Search Results field at the bottom of the main application screen as shown in Figure 7.7.</P>
<P><A NAME="Fig7"></A><A HREF="javascript:displayWindow('images/07-07.jpg',480,240 )"><IMG SRC="images/07-07t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/07-07.jpg',480,240)"><FONT COLOR="#000077"><B>Figure 7.7</B></FONT></A>&nbsp;&nbsp;The result of a successful record search.</P>
<P><FONT SIZE="+1"><B>Determining the Size of the Phone List Database</B></FONT></P>
<P>The final interesting feature of the phone list application is that it allows the user to determine how much object store memory is being used by the phone list database. This feature is invoked by selecting the Database Memory option from the Options menu.
</P>
<P>Selecting the Database Memory menu item displays the dialog box shown in Figure 7.8. This dialog simply reports the total number of bytes consumed by the phone list database and the records it contains.</P>
<P><A NAME="Fig8"></A><A HREF="javascript:displayWindow('images/07-08.jpg',480,240 )"><IMG SRC="images/07-08t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/07-08.jpg',480,240)"><FONT COLOR="#000077"><B>Figure 7.8</B></FONT></A>&nbsp;&nbsp;The phone list Database Memory Consumption dialog.</P>
<H3><A NAME="Heading3"></A><FONT COLOR="#000077">Programming Windows CE Databases</FONT></H3>
<P>If you are familiar with writing database applications for relational databases, you will find the Windows CE database model very different. Databases under Windows CE do not support any form of structured query language, and provide none of the relational data manipulation techniques such as table joins. Windows CE databases are simply non-hierarchical collections of an arbitrary number of <I>records</I>, each of which contains one or more data <I>properties</I>. Properties can be the integer, Unicode string, FILETIME, or blob (byte array) data.</P>
<P>As with any object stored in the Windows CE object store, every database and database record is assigned a unique object identifier of type CEOID by the Windows CE operating system. This object identifier can be used, for example, when searching for database records or to identify records to delete from a database.</P>
<P>Another important part of a Windows CE database is the <I>current record pointer</I>. This is also sometimes called the <I>seek pointer</I>. This pointer indicates the record to be read by the next database read operation. The current record is therefore defined to mean the record currently pointed to by the seek pointer. As an application reads records in a database, the current record pointer (or seek pointer) can be thought of as marking the current record position. Seeking and reading records in the database can move the seek pointer position. These operations are discussed in detail later.</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="185-189.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="192-196.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>


<!-- all of the reference materials (books) have the footer and subfoot reveresed -->
<!-- reference_subfoot = footer -->
<!-- reference_footer = subfoot -->

<!-- BEGIN SUB FOOTER -->
		<br><br>
		</TD>
    </TR>
	</TABLE>

		
	<table width="640" border=0 cellpadding=0 cellspacing=0>
		<tr>
		<td align="left" width=135><img src="/images/white.gif" width=100 height="1" alt="" border="0"></td>
		
		
<!-- END SUB FOOTER -->

<!-- all of the books have the footer and subfoot reveresed -->
<!-- reference_subfoot = footer -->
<!-- reference_footer = subfoot -->

<!-- FOOTER -->
			
		<td width="515" align="left" bgcolor="#FFFFFF">
<font face="arial, helvetica" size="1"><b><a href="/products.html"><font color="#006666">Products</font></a>&nbsp;|&nbsp; <a href="/contactus.html"><font color="#006666">Contact Us</font></a>&nbsp;|&nbsp; <a href="/aboutus.html"><font color="#006666">About Us</font></a>&nbsp;|&nbsp; <a href="http://www.earthweb.com/corporate/privacy.html" target="_blank"><font color="#006666">Privacy</font></a> &nbsp;|&nbsp; <a href="http://www.itmarketer.com/" target="_blank"><font color="#006666">Ad Info</font></a> &nbsp;|&nbsp; <a href="/"><font color="#006666">Home</font></a></b>
		<br><br>
		
		Use of this site is subject to certain <a href="/agreement.html">Terms &amp; Conditions</a>, <a href="/copyright.html">Copyright &copy; 1996-1999 EarthWeb Inc.</a><br> 
All rights reserved.  Reproduction whole or in part in any form or medium without express written permision of EarthWeb is prohibited.</font><p>
</td>
		</tr>
</table>
</BODY>
</HTML>

<!-- END FOOTER -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -