Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Mobile
  4. How to define sort order in Access and convert to .cdb ?

How to define sort order in Access and convert to .cdb ?

Scheduled Pinned Locked Moved Mobile
questionjsontutorial
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nick
    wrote on last edited by
    #1

    Hi experts, I need to open the .cdb with sort order in API call, but I found that the .cdb converted from .mdb has no sort order, how can I define it in the Access .mdb and would it be lost after the convertion to .cdb? thanks a lot.

    J 1 Reply Last reply
    0
    • N Nick

      Hi experts, I need to open the .cdb with sort order in API call, but I found that the .cdb converted from .mdb has no sort order, how can I define it in the Access .mdb and would it be lost after the convertion to .cdb? thanks a lot.

      J Offline
      J Offline
      Joao Paulo Figueira
      wrote on last edited by
      #2

      Did you ty creating an index on the table with the required sort order? Regards, João Paulo

      N 1 Reply Last reply
      0
      • J Joao Paulo Figueira

        Did you ty creating an index on the table with the required sort order? Regards, João Paulo

        N Offline
        N Offline
        Nick
        wrote on last edited by
        #3

        Thanks for your reply. You're right! The code is fine if I created the DB insided the PPC with the sort order, but it fail when I created the database from Access (officeXP version), and converted to .cdb while copying it to the device. The database has only 3 columns in it: BookID(char 8), Content (char 90), Notes (char 255) Actually I've defined BookID as the unique key index, so how can I define the sort order for it? Even if I type "BookID ASC" in the property page of the Access' db, I get the same result. Is it the ActiveSync's bug that lost the sort order? or where else I shuld define the sort order? If no solution for it, could you suggess any web-site teaching how to install and use SQL CE? expecially how to pack the whole thing including the SQL CE and install together for my client's PPC2002? Please help!

        J 1 Reply Last reply
        0
        • N Nick

          Thanks for your reply. You're right! The code is fine if I created the DB insided the PPC with the sort order, but it fail when I created the database from Access (officeXP version), and converted to .cdb while copying it to the device. The database has only 3 columns in it: BookID(char 8), Content (char 90), Notes (char 255) Actually I've defined BookID as the unique key index, so how can I define the sort order for it? Even if I type "BookID ASC" in the property page of the Access' db, I get the same result. Is it the ActiveSync's bug that lost the sort order? or where else I shuld define the sort order? If no solution for it, could you suggess any web-site teaching how to install and use SQL CE? expecially how to pack the whole thing including the SQL CE and install together for my client's PPC2002? Please help!

          J Offline
          J Offline
          Joao Paulo Figueira
          wrote on last edited by
          #4

          I usually have no such problems, but I'm using either ADOCE or OLE DB. How are you accessing the database? Regards, João Paulo

          N 1 Reply Last reply
          0
          • J Joao Paulo Figueira

            I usually have no such problems, but I'm using either ADOCE or OLE DB. How are you accessing the database? Regards, João Paulo

            N Offline
            N Offline
            Nick
            wrote on last edited by
            #5

            well, I'm using API in eVC: g_hDB = CeOpenDatabaseEx (&g_guidDB, &g_oidDB, _T("book"), 0, /* <- default sort order*/ 0, NULL); I must use "0" for the sort-order since it get an open error if I specify any other value. please advices, thanks.

            J 1 Reply Last reply
            0
            • N Nick

              well, I'm using API in eVC: g_hDB = CeOpenDatabaseEx (&g_guidDB, &g_oidDB, _T("book"), 0, /* <- default sort order*/ 0, NULL); I must use "0" for the sort-order since it get an open error if I specify any other value. please advices, thanks.

              J Offline
              J Offline
              Joao Paulo Figueira
              wrote on last edited by
              #6

              The native db API is not really my speciality. :( But if you want to take a look at ADOCE, check this: A set of ADOCE classes[^] Regards, João Paulo

              N 1 Reply Last reply
              0
              • J Joao Paulo Figueira

                The native db API is not really my speciality. :( But if you want to take a look at ADOCE, check this: A set of ADOCE classes[^] Regards, João Paulo

                N Offline
                N Offline
                Nick
                wrote on last edited by
                #7

                I will try it, thanks for helping !

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups