Converting from access (.mdb) to pocket access (.cdb)

How do I convert from desktop access to pocket access?  I need to do this totally in the desktop environment.  I'm using the pocket pc 2003 emulator to test a program written in c# for the pocket pc using visual studio.  Once the access file is converted to pocket access, I will copy it to the emulator.  The solution I need is: how do I convert the .mdb to .cdb without using active sync or buying a third party software package?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DesktopToDevice API

DesktopToDevice enables programmatic control over the conversion of .mdb files to ADOCE tables.
Its behavior parallels that of the Import from Database to Mobile Device dialog box,
except that the user-choice dialog boxes do not appear. All progress bars do appear,
showing the transfer status. An error return does not cause the log file to automatically display.
Instead, an error value, which is HRESULT, is returned by the function.
The calling application then can take appropriate action.

Show me the code!

DESKTOPTODEVICE (DesktopLocn, TableList, Sync, Overwrite, DeviceLocn)

    Specifies the file name and path of the .mdb file to be transferred, or the DSN name if
    ODBC support is enabled.
    Specifies the list of tables and fields that is converted and copied to the device.
    It takes the following form:


    A leading “!” marks this table as read-only on the device.
    If this is a zero-length string ("") or if the parameter is not provided,
    then the default copying of all tables and appropriate fields is performed.
    If a table is requested but no field list is provided, then the default fields are copied.

    The following code example shows how to copy the Employees table as read-only,
    how to copy the Product ID and Product Name fields from the Products table,
    and how to copy the Order ID field from the Orders table.

!Employees..Products.Product ID.Product Name..
Orders.Order ID..

    The simplest form of TableList is


    This code example shows how to copy the entire Employees table to the device and
    enable it to be updated.

    Because neither a period (.) nor an exclamation mark (!) are valid in field or table names,
    there is no need to delimit table names. Delimited field or table names are not supported.
    Optional. Always False. Provided for future compatibility.
    Optional. Setting this parameter to True overwrites tables with the same name on the device.
    Setting this parameter to False generates new table names. True is the default.
    Provided for future compatibility. Always a zero-length string ("").
    Database tables are copied to the object store on the H/PC.


The following code example shows a simple Visual Basic application that copies a subset of the
Northwind database to the device with no synchronization, but overwriting any existing
Northwind tables. The Employees table is sent as a read-only table,
while the Products table can be updated.

Declare Function DESKTOPTODEVICE Lib _
"c:\program files\windows ce services\adofiltr.dll" _
(ByVal desktoplocn As String, _
        ByVal tablelist As String, _
        ByVal sync As Boolean, _
        ByVal overwrite As Integer, _
ByVal devicelocn As String) As Long

result = DESKTOPTODEVICE("c:\mydbs\nwind.mdb", _
"!Employees..Products.ID.Name.Quantity..", False, True, "")
If result <> 0 Then MsgBox "An error occurred transferring the data"

fly412sAuthor Commented:
jimwasson:  Great start in the right direction, however, I'm not programming in the eVB environment.  I tried both of the url's you listed.  Neither one was able to solve my problem.

Mikal613:  I've already found the web site you reference, however, I do not want to programmatically create the pocket access database.

Thank-you both very much.  Any other suggestions?
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

well what do you want if not programmatically ?
fly412sAuthor Commented:
I plan on ultimately using active sync to synchronize the desktop .mdb file with the hand held .cdb file.  Active sync does a great job of converting the files.  The conversion from desktop to hand held is not the issue.  The issue is converting the access file with resources only on my desktop then copying the .cdb file to the emulator.  Until my project is ready to be distributed, I need to do all of the testing on a pocket pc 2003 emulator.  
so you want an EXE to convert the database on your desktop? thats it?
fly412sAuthor Commented:
I'm sorry if I aggravated you.  You're the top expert in this forum.  I recognize your devotion to the programming environment.  

I looked at devbuzz and could not find an executable to convert the database on my desktop.
fly412sAuthor Commented:
By the way, you're exactly right.  An exe converter is exactly what I'm looking for.
There is none.

your options is sending a Text file to the emulator and the emulator converts it to a CDB (sits on your machine)

buy a cheap Pocket Pc  and have Act Sync convert it for you.

There is no program out there . MS does have the power to make it if we had access to the Active Sync code but we dont.

Sorry ;(

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fly412sAuthor Commented:
I've discovered a way that works.  I use ActiveSync to convert the desktop Access database to the Pocket Access format.  When the Pocket Access file is on my Ipaq, I simply e-mail it as an attachment to myself from my Ipaq.  It works perfect.  Now, I have a Pocket Access database file on my desktop which I can use to test in my development environment on my desktop.
Thanks. We end up using PDA Tech Pocket PC CeSync v4 ( It converts MDB <-> CDB on all versions of ActiveSync and even works with Vista!
^ Oops, wrong thread. Please delete.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Smartphone Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.