Register your product to gain access to bonus material or receive a coupon.
The Windows Pocket PC and Handheld PC are the most robust handheld development platforms ever created. Now, there's a start-to-finish guide to VB handheld development for every Windows programmer. Best-selling Win32 expert Nick Grattan focuses on today's most exciting opportunities for handheld development: integration with existing enterprise and Web applications. Grattan begins with a thorough introduction to the Embedded Visual Basic (EVB) environment used to create Pocket PC/Handheld PC applications, and the key differences between EVB and desktop VB. He shows how to develop database applications using SQL Server for Windows CE, presenting detailed techniques for managing remote data access and replication. The book includes detailed coverage of sending and receiving data from IIS using ASP pages and Pocket Internet Explorer; receiving and parsing XML documents; and the role of .NET Services and SOAP in handheld development. Coverage also includes: managing remote access connections; interacting with data stored in Pocket Office; the Registry; file and serial I/O; and finally, architecting mobile solutions for maximum performance and reliability. For all developers interested in creating applications for Microsoft Pocket PCs and Handheld PCs, and for developers migrating from earlier versions of Windows CE.
Preface.
Acknowledgments.
1. Introduction to eVB Development.
You, the Reader. What You Will Need. Pocket PC, Handheld PC 2000, and Other Devices. Pocket PC. Handheld PC 2000. Other Devices. Overview of eMbedded Visual Basic (eVB). Compared to Visual Basic 6.0. Using eMbedded Visual C++ (eVC). Emulation. Development Tools Installation. Creating a “Hello World” Application. Network Connections. Configuring HPC 2000 Network Support. Configuring Pocket PC Network Support. Platform Manager. Remote Tools. ActiveX Controls and the Windows CE Control Manager. Project Settings and Properties. Error Handling. eVB Data Types. Debugging. Conclusion.
The Pocket PC Interface. Managing Pocket PC MenuBars. Responding to Menu Selections. Using the New Button. Changing a Menu Item at Run Time. Accessing Menu Items at Run Time. Inserting and Deleting Menu Items. Adding MenuBar Buttons. Pocket PC Dialog Boxes. The HPC 2000 Interface. Designing Application Windows. Creating a Pocket PC Application Window. Creating an HPC 2000 Application Window. Conclusion.
Microsoft SQL Server for CE Features. The ADOCE 3.1 Architecture. Microsoft SQL Server for CE Installation. Installing ADOCE and ADOXCE on the Device. Copying SSCE Files. Installing ISQLW for Windows CE. Simple Database Operations. Creating a Database (Catalog). Opening and Closing Databases. Creating a Table. Adding Records. Listing Records. Using ISQLW_CE. Tables and Columns. Integer Data Types. Numeric, Float, Real, and Money Data Types. Binary, VarBinary, and Image Data Types. UniqueIdentifer Data Type and ROWGUIDCOL. The Identity Property. Null ability and Uniqueness. Referential Integrity and Primary and Foreign Keys. Default Values. Using DROP TABLE. Using ADOXCE With Tables. Indexes. Manipulating Data. Creating and Opening Databases. Error Handling. ADOCE Record sets and the SELECT Statement. INSERT, DELETE, and UPDATE Statements. Managing Transactions. Encryption and Password Protection. Compacting a Database. Creating a Database For Distribution. Conclusion.
Remote Data Access. RDA Installation and Configuration. Programming RDA. SQL Server CE Relay. Security. SQL Server Replication. Installation and Configuration. Programming Replication. Dealing with Conflicts. Conclusion.
Using the WinSock Control. Sending Data with an HTTP GET. Sending Data with an HTTP POST. The HTTP Component. Making a Simple Request. Posting Data. Using NT Authentication. Using a Proxy Server. Conclusion.
XML. Document Object Model (DOM). Microsoft SQL Server 2000 and XML. Configuring XML Support. Creating a Template. Accessing a Template from evb. Parameterized Templates. Displaying XML Documents in a TreeView Control. Handling SQL Errors. Adding Data with Templates. Annotated Schemas and Xpath. ADO Recordsets and XML. Creating and Managing XML Documents with DOM. Creating XML Documents with Elements. Creating XML Documents with Attributes. Sending an XML Document to an ASP Page. Conclusion.
The Simple Object Access Protocol (SOAP). Installing SOAP 2.0 Toolkit. SOAP XML Document Structures. Making SOAP Calls from Pocket PC and HPC 2000 Applications. Using .NET Web Services. Creating a .NET Web Service with VB.NET. Calling Web Services with HTT
More and more, developers are looking at incorporating mobile devices, such as Pocket PC and Handheld PC 2000 (HPC 2000) devices, into mainstream computing projects, as either stand-alone applications or applications that integrate into existing systems. Using the eMbedded Visual Basic development tool is the easiest way of creating such applications, particularly because it allows developers to draw on their desktop and server application development skills.
For this book, I have tried to select topics that will inform developers needing to provide access to data on the move. First I introduce eMbedded Visual Basic development (Chapter 1); then I explain how to develop user interfaces with eMbedded Visual Basic (Chapter 2). Next I show how to store data locally using SQL Server for Windows CE (Chapter 3). Using these techniques, you can quickly develop stand-alone applications that store data locally on a Pocket PC or HPC 2000 device.
The most significant challenge in developing mobile applications is to provide access to databases located on servers while users are out and about. SQL Server for Windows CE provides various techniques for exchanging data with database servers (Chapter 4). Remote Data Access (RDA) provides a simple "push" and "pull" facility that will work with all versions of Microsoft SQL Server and other database servers such as Oracle. The most sophisticated technique in SQL Server for Windows CE is merge replication, which works only with Microsoft SQL Server 2000. Using this technique, mobile users can access local data in an SQL Server for Windows CE database while not connected to the network, and then use merge replication to provide an automatic two-way update of data when a connection is made.
Many application architectures do not provide for direct database access from client applications; there is generally a "middle tier" consisting of business objects providing secure access to the database. In this case, web-development techniques such as ASP (Active Server Page) and HTTP (Hypertext Transfer Protocol) can be used to access business components and thus transfer data (Chapter 5). Your application can decide on the format used for transferring data or you can use XML (Extensible Markup Language) as a standard but more verbose data exchange format. XML documents can be parsed and represented as a Document Object Model (DOM) on Pocket PC and HPC 2000 applications (Chapter 6). ASP is designed predominantly for developing web pages that will be accessed through a web browser but can be adapted to allow applications to make requests. SOAP (Simple Object Access Protocol) uses HTTP to allow function-based calls to be made through web servers. Chapter 7 shows how to make SOAP calls from eMbedded Visual Basic.
ASP.NET, which can be programmed using Visual Studio.NET, takes SOAP and HTTP programming techniques and allows Web Services to be created (Chapter 7). Web Services are function-oriented interfaces that can be easily called from eMbedded Visual Basic applications. Rich data sets can be transferred using techniques described in this book, including accessing databases using ADO.NET and returning data as XML documents.
An important aspect of creating mobile applications is making and managing connections to a network. Chapter 8 shows how to make a connection using RAS (Remote Access Services) through, for example, a modem and a mobile phone. RAS functions are difficult to call directly from eMbedded Visual Basic, so an ActiveX component is provided with this book to make the RAS function calls. The source code for this ActiveX component is also included.
In addition to databases, there are other facilities for storing data. These include POOM (Pocket Outlook Object Model) for storing contact, calendar, and task information (Chapter 9) and the Object Store for files and registry data (Chapter 10). Finally, Chapter 11 describes how to create setup files and Chapter 12 discusses important architecture and design issues you should consider when creating an application.
While eMbedded Visual Basic provides a flexible and productive development environment, it does not provide complete access to all Pocket PC and HPC 2000 features. There may be times when you need to use C or C++ to access API functions. My previous book, Windows CE 3.0 Application Programming (by Nick Grattan and Marshall Brain, Prentice Hall PTR, 2001; ISBN 0-13-025592-0), describes how to call many of these API functions.
Please feel free to contact me by email at nick@softwarepaths.com
if you have questions or suggestions, or visit my website, www.nickgrattan.net
, where updates will be posted. I will try to answer your questions but cannot always promise to do so. I hope you enjoy developing mobile solutions with eMbedded Visual Basic.