How to define sort order in Access and convert to .cdb ?
-
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.
Did you ty creating an index on the table with the required sort order? Regards, João Paulo
-
Did you ty creating an index on the table with the required sort order? Regards, João Paulo
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!
-
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!
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
-
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
-
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.
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
-
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