Skip to main content

Past Blast

Featured Products

Windows Mobile Developer Controls
Windows Mobile Developer Controls

Twitter Updates

    News

    New site design will be posted by Wednesday.
    6/2/2008 8:07:00 AM

    Windows Mobile Developer Controls
    Sapphire Soltuions
    Skip Navigation Links Breadcrumb Articles Breadcrumb Past Blast BreadcrumbeVB Database

    Convert Access mdb database into an eVB cdb database for emulation.

    Written by Ricky Lovedioro  [author's bio]  [read 131267 times]
    Edited by Derek

    Page 1  Page 2 

    7. Click 'Select TDB' button then select your TDB file from the dialog box that will appear.

    8. Finally, Click 'Create Tables' button.

    By the way, I'm using a Pocket PC emulator. I haven't tested this program on other types of mobile devices (e.g. H/PC or Palm PC).

    evb Code to test the conversion

    [Ed note - After running Roderick's code above, which he neatly adapted from the eVB samples - I thought we needed some small eVB sample to access the converted database in the emulator. Download the eVB code.]

    Use this eVB Project to test that you were able to successfully port the .mdb database into the emulation environment.

    1) Open this project in eVB

    2) Open Project Properties and check that the target device is set to Pocket PC Emulation

    3) Make sure you have the appropriate 'Update Components Frequency' options checked

    4) copy deVBuzz_ppc.bmp to your emulation root:
    'c:\Windows CE Tools\wce300\MS Pocket PC\emulation\palm300'

    5) Hit F5

    6) Enter the database name you converted in the text box

    The Code

    Dim DBFileSpec As String
    Dim conndb As ADOCE.Connection
    Dim rs As ADOCE.Recordset
    Dim RecordCount As Integer
    Dim arb1 As Integer

    DBFileSpec = Form1.Text1.Text
    List1.Clear

    'create a connection to the database
    Set conndb = CreateObject("ADOCE.Connection.3.0")
    conndb.ConnectionString = "data source = " & DBFileSpec
    conndb.Open

    Set rs = CreateObject("ADOCE.Recordset.3.0")
    rs.Open "MSysTables", conndb, adOpenKeyset, adLockOptimistic
    RecordCount = rs.RecordCount
    For arb1 = 0 To RecordCount - 1
    List1.AddItem rs.Fields("TableName").Value
    rs.MoveNext
    Next
    rs.Close
    Set rs = Nothing

    Set conndb = Nothing

    Previous Page