Danny Epstein <[EMAIL PROTECTED]> wrote on 99/10/06 10:31 pm:

> You might try using DmGetNextDatabaseByTypeCreator to scan through all the
> databases with your creator ID. I can't say for sure, but I expect this
> should take about half as long as finding each database one at a time. In
> either case, the time is proportional to the number of databases. It sounds
> like you have a lot of databases on your device!

Actually I wasn't using DmGetNextDatabaseByTypeCreator.  I was using:

    if (!(DatebookDB = DmOpenDatabaseByTypeCreator(DatebookDBType,
        DatebookAppID, mode | dmModeReadOnly))) return false;

So I just changed it to:

    if ((DmGetNextDatabaseByTypeCreator(true, &searchInfo, DatebookDBType,
        DatebookAppID, true, &cardNo, &dbID) == 0) &&
        !(DatebookDB = DmOpenDatabase(cardNo, dbID, mode | dmModeReadOnly)))
        return false;

It is definitely faster.  With the 4 files I open it is about 1/4 second
faster overall.  Many thanks!  I guess it is because it doesn't have to worry
about getting the latest version of the file.


/* Chris Faherty <[EMAIL PROTECTED]>, finger for PGP */

Reply via email to