Sort Databases

Sort Databases

Post by Pedro Rio » Sun, 06 Jul 2003 11:21:16



Hi, is there a way to set a secondary sort key for a CCeDBDatabase, i have
tried with

 CCeDBProp SortProps[2] = {
  CCeDBProp(CCeDBProp::Type_String, PROP_PROJECT,
      CCeDBProp::Sort_Ascending),
  CCeDBProp(CCeDBProp::Type_String, PROP_NAME,
      CCeDBProp::Sort_Ascending)
 };

database.Open(DB_NAME_PROJECTS, SortProps);

but it doesn't sort on PROP_NAME, only PROP_PROJECT

is there some oher way to do this?

thanks

 
 
 

Sort Databases

Post by Susan Loh [MS » Wed, 09 Jul 2003 06:18:44


CCeDBDatabase is a wrapper around the CEDB database engine, which in
Windows CE 3.0 (which is on PocketPC and PocketPC 2002) does not support
multiple-property sort orders.  CEDB does support multiple-property sort
orders in Windows CE 4.0+ (which is in PPC 2003), but even then I don't
think they revv'd the CCeDBDatabase class to expose that support.  I might
be wrong.

Sue

_____________________________________________________________
This posting is provided "AS IS" with no warranties, and confers no rights.
_____________________________________________________________
Windows Embedded FAQ
(http://www.microsoft.com/windows/embedded/faq/default.asp)

--------------------

Subject: Sort Databases
Date: Fri, 4 Jul 2003 22:21:16 -0400
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

Newsgroups: microsoft.public.pocketpc.developer
NNTP-Posting-Host: 200.105.131.98
Path: cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa09.phx.gbl microsoft.public.pocketpc.developer:9132
X-Tomcat-NG: microsoft.public.pocketpc.developer

Hi, is there a way to set a secondary sort key for a CCeDBDatabase, i have
tried with

 CCeDBProp SortProps[2] = {
  CCeDBProp(CCeDBProp::Type_String, PROP_PROJECT,
      CCeDBProp::Sort_Ascending),
  CCeDBProp(CCeDBProp::Type_String, PROP_NAME,
      CCeDBProp::Sort_Ascending)
 };

database.Open(DB_NAME_PROJECTS, SortProps);

but it doesn't sort on PROP_NAME, only PROP_PROJECT

is there some oher way to do this?

thanks

 
 
 

1. Iterating sort database problem

Hello,
I am using MFC for database handling using CCeDBDatabase.
I need to iterate the DB and update some records in it. The DB is created
with sorting props.
The problem is as following:
if I itearate using:
CEOID id = SeekFirst();
while(id)
{
    read current record;
    write current record;
    id = SeekNext();
I am running to endless loops.

On the other hand, when using:

for(int i =0; i < NumRecords(); i++)
{
    SeekToIndex(i);
    read current record;
    write current record;
It will skip some records, and will open some record(s) (with the same
CEOID) a number of times.

Any idea how to iterate and update a sorted DB ????
--
Regards,
Miron.

======================================================================
Eng. Miron Ophir,
The MobiMate Team

Home Page:  www.mobimate.com
ICQ:                6785948
======================================================================

To reply to this message, remove underscore from email address.

2. Ras Gray Out

3. CE database sorting?

4. How do I hide a tab?

5. Delete Monet 2000 Database from Database folder

6. ATARI-COMMODORE Preservation Society

7. Access database ActiveSync lockup on large databases

8. eVB-Database "Error Database not found"

9. Pocket PC database to access database

10. Error: source database too long when sychronizing Access database

11. Updating contact database with ActiveSync results in all updated -- same database!!

12. Convert Access mdb database into an eVB cdb database for emulation PPC 2002