> From: I am johnny~
> Can I open two or more same creator ID database at one time ?

Yes, if what you really mean is "open two or more databases with the same
creator ID, leaving them open".  (Your app has only one thread, so you can't
really do 2 things "at the same time", and unless you have multiple cpu's,
even with multiple threads you still can't really do 2 things "at the same
time".  But I am digressing from your real question...)

> If I do that, second database will can't got current dbID.
> and I try use difference creator ID, I can got it and current ... !

What makes you think you can't get the dbIds?  Here's some (untested) code
(with no error checking) that should work:

LocalID dbID1, dbID2;
DmOpenRef db1 = DmOpenDatabaseByTypeCreator('Typ1', 'CRID',
dmModeReadWrite);
DmOpenRef db2 = DmOpenDatabaseByTypeCreator('Typ2', 'CRID',
dmModeReadWrite);
Err err1 = DmOpenDatabaseInfo(db1, &dbIDP1, NULL, NULL, NULL, NULL);
Err err2 = DmOpenDatabaseInfo(db2, &dbIDP2, NULL, NULL, NULL, NULL);

Unless I misunderstood your question, the above code does exactly what you
said you couldn't do.


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to