Team-Fly |
eMbedded Visual Basic: Windows CE and Pocket PC Mobile Applications By Chris Tacke, Timothy Bassett | |
Table of Contents | |
Microsoft publishes ActiveX Data Objects for Windows CE (ADOCE) in the platform SDKs. ADOCE allows eVB applications to access data. Historically, ADOCE was an object model that allowed an application to use data in the CE Object Store. Its intention wasn't actually to access data currently stored in the CE Object Store, such as the native PIM contacts, the calendar, and so on, but it did allow applications to define their own data in the CE Object Store and manipulate these structures and data. With the introduction of ADOCE 3.0, ADOCE could access Microsoft Pocket Access files. Pocket Access is a lightweight version of Microsoft Access that ships with its Office product. This was a welcome change, because tables in the CE Object Store had to be uniquely named. This meant that no two applications could have a table named "contacts," "accounts,"or so on. Also, an application had to manually delete the tables from the object, a task most eVB programmers didn't bother with. This meant that an application using the Object Store that was removed from the machine could leave behind tons of obsolete data. Interestingly enough, Microsoft doesn't publish a Pocket Access application for the Pocket PC, nor is there one for the Palm- size PC. But, ActiveSync allows users to sync a Microsoft Access database to a Pocket PC. Allowing ActiveSync to sync a Microsoft Access database to the device with no software to access must be extremely confusing to nonprogrammer users. But, after placing a Pocket Access database (or creating it programmatically as we do in our sample application), eVB can utilize ADOCE to store and query data. With SQL Server CE, came ADOCE 3.1 and the capability to actually use a powerful data engine. SQL Server CE runs on top of OLEDBCE, a implementation of OLEDB for Windows CE. This means that third-party vendors can publish OLEDBCE drivers for data storeslocal and remoteand ADOCE can access them. (SQL Server CE is discussed in Chapter 8, "Using SQL Server CE in a Mobile Environment.") Although ADOCE presents a similar object model, there are differences between it and the ADO model for Win32 MDAC kit. ADOCE has limitations that you need to be aware of when designing an application for Windows CE, as discussed in Chapter 2, "Introducing eMbedded Visual Basic." This chapter presents a sample application that uses an architecture that works well with ADOCE. The sample application's design probably wouldn't be the best for operating on a desktop or server, but it is well-suited for CE and ADOCE. With a Windows CE application and Pocket Access, remember that the data access is local, like applications before client/server or three- tier applications. Keep this in mind when developing Windows CE applications. This chapter doesn't cover remote data access available with technologies such as SQL Server CE, ViaXML, or CEFusion. This chapter instead presents an application that's best for a single user due to its nature of working standalone or with a single Microsoft Access database residing on a desktop machine. With that in mind, in this chapter you will
|
Team-Fly |
Top |