Click here to Skip to main content
6,306,412 members and growing! (18,858 online)
Email Password   helpLost your password?
Platforms, Frameworks & Libraries » Mobile Development » Database     Intermediate

C++ wrapper for ADOCE filtering

By Olivier Gaumond

A simple class to use the DesktopToDevice and DeviceToDesktop functions from a C++ project.
VC6, VC7, Windows, Mobile, Visual Studio, MFC, Dev
Posted:31 Aug 2002
Views:72,197
Bookmarked:24 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
10 votes for this article.
Popularity: 4.15 Rating: 4.15 out of 5

1

2

3
2 votes, 33.3%
4
4 votes, 66.7%
5

Overview

The DesktopToDevice and DeviceToDesktop functions allows you to transfer and/or synchronize MS Access databases (.mdb files) to a Windows CE device (.cdb files). These functions were designed to be used from Visual Basic, however it is still possible to call them from C++ projects by locating the function in the dll.

The original code was written by Nathan Lewis (nlewis@programmer.net, http://www.ticz.com/~nlewis) I simply reorganized the functions in a class to make it easy to use from MFC projects. I use the Singleton pattern to ensure that the class is only instanciated once and the dll gets loaded only one time.

Usage

To use the class in your project you simply need to include it in your project. To get an instance of the CAdoFiltr class you must use the getInstance() function, you can't use the constructor since it is protected. For more information on the parameters you can pass to DesktopToDevice and DeviceToDesktop see MSDN.

Eg:

CAdoFiltr* pAdoFiltr = CAdoFiltr::getInstance();

HRESULT hr = pAdoFiltr->DesktopToDevice("c:\\database\\test.mdb",
		"tblTest..!tblTest2..", 
		false, true, "\\My Documents\\test.cdb");

if (hr != S_OK)
{
	//transfer has failed

}

I tested the code under Windows NT 4 Workstation with ActiveSync 3.5 and an iPAQ 3650 running PocketPC 2000

Documentation

The documentation files were generated by doxygen, it explains the strange tags in the comment blocks through the code.

  • For more information about ADOCE and the DesktopToDevice and DeviceToDesktop functions see MSDN.
  • For more information about using these functions from C/C++ see the original contribution from Nathan Lewis.
  • For more information about the Singleton pattern you can have a look to Pattern Digest.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Olivier Gaumond


Member

Occupation: Web Developer
Location: Canada Canada

Other popular Mobile Development articles:

  • Writing Your Own GPS Applications: Part 2
    In part two of the series, the author of "GPS.NET" teaches developers how to write GPS applications suitable for the real world by mastering GPS precision concepts. Source code includes a working NMEA interpreter and sample high-precision application in C# and VB.NET.
  • Writing Your Own GPS Applications: Part I
    What is it that GPS applications need to be good enough to use for in-car navigation? Also, how does the process of interpreting GPS data actually work? In this three-part series, I will cover both topics and give you the skills you need to write a commercial-grade GPS application.
  • Learn How to Find GPS Location on Any SmartPhone, and Then Make it Relevant
    A step by step tutorial for getting GPS from any SmartPhone, even without GPS built in, and then making location useful.
  • Pocket 1945 - A C# .NET CF Shooter
    An article on Pocket PC game development
  • iPhone UI in Windows Mobile
    It's an interface that works with transparency effects. As a sample I used an interface just like the iPhone one. In this tutorial I am explaining how simple is working with transparency on Windows Mobile.
Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 17 of 17 (Total in Forum: 17) (Refresh)FirstPrevNext
QuestionDo it in VC++ PinmemberMichelly04059:28 10 Sep '07  
Questioncan not overwrite .cdb file in my device [modified] Pinmembersaygogogo5:15 11 Oct '06  
GeneralDevicetodesktop - Desktoptodevice and WM5 Pinmemberjsoftmonopoli22:41 6 Jul '06  
GeneralThe doxygen link leads to a domain squatter Pinmemberowbear@dodgeit.com1:14 31 Aug '05  
GeneralProblem with Seek() method Pinmembergeorgeivanov2:01 9 Oct '03  
GeneralHow to get Device Desktop to Pc? PinmemberNoohsamui22:32 23 Sep '03  
GeneralWhen does the instance of CAdoFiltr get deleted ? PinmemberRay Kinsella0:40 13 Jun '03  
GeneralRe: When does the instance of CAdoFiltr get deleted ? PinmemberTanzim Husain1:36 30 Jun '03  
GeneralRe: When does the instance of CAdoFiltr get deleted ? Pinmemberdeborabeatriz21:59 25 Aug '03  
Generallittle promblem here Pinmembercdextraze11:29 24 Apr '03  
GeneralSyncronizing database between PC and Pocket PC 2002 PinmemberLoron3:59 26 Mar '03  
GeneralRe: Syncronizing database between PC and Pocket PC 2002 PinmemberJoão Paulo Figueira0:00 27 Mar '03  
GeneralRe: Syncronizing database between PC and Pocket PC 2002 PinmemberLoron4:59 27 Mar '03  
GeneralCould you please provide some sample code about using ADOCE in PPC? PinmemberBui Huy Kien19:14 23 Feb '03  
GeneralUnicode PinmemberJoão Paulo Figueira5:51 29 Jan '03  
GeneralRe: Unicode PinmemberNathan Lewis7:18 13 Mar '07  
GeneralWow - I'm flattered! PinmemberNathan Lewis7:17 10 Sep '02  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 31 Aug 2002
Editor: Chris Maunder
Copyright 2002 by Olivier Gaumond
Everything else Copyright © CodeProject, 1999-2009
Web20 | Advertise on the Code Project