This is a snippet of the code.  I'm not sure the problem is here.  I think
it might be with the pdb files I created as my pdb browser didn't find them
either.

DmSearchStateType searchState;
Int16 count = 0;
UInt16 cardNo;
LocalID dbID;

Err err = DmGetNextDatabaseByTypeCreator(true, &searchState, 's28', 'PCZF',
false, &cardNo, &dbID);

while (err == errNone && dbID)
{
     // Do stuff with database
     err = DmGetNextDatabaseByTypeCreator(false, &searchState, 's28',
'PCZF', false, &cardNo, &dbID);
}

Mark Lenz
(920) 832-3523
[EMAIL PROTECTED]


                                                                                       
                                 
                    Robert McKenzie                                                    
                                 
                    <[EMAIL PROTECTED]>         To:     "Palm Developer 
Forum"                              
                    Sent by:                                 
<[EMAIL PROTECTED]>                           
                    bounce-palm-dev-forum-48969@news.       cc:                        
                                 
                    palmos.com                              Subject:     RE: 
DmGetNextDatabaseByTypeCreator             
                                                                                       
                                 
                                                                                       
                                 
                    04/19/2002 02:47 PM                                                
                                 
                    Please respond to "Palm Developer                                  
                                 
                    Forum"                                                             
                                 
                                                                                       
                                 
                                                                                       
                                 




just a few random thoughts.

DmGetNextDatabaseByTypeCreator takes a "search state" parameter, which it
uses to record the state of its search and hence implement the "next" part
of its name.  Of course, it needs to know when it is starting the search,
so
it also takes a "new Search" parameter.  Two possible sources of error:

#1.  Always call it with "new Search" true -- it will never find more than
the first database it stumbles onto.

#2.  Do not preserve the "search state" structure in between calls.  It can
get real confused then...

Of course, these are beyond the obvious ones of giving it the wrong type
and/or creator (like byte-reversing the values).

-bob mckenzie, palmsource pdx

-----Original Message-----
From: Mark Lenz [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 12:35 PM
To: Palm Developer Forum
Subject: DmGetNextDatabaseByTypeCreator


Does anyone know what would cause DmGetNextDatabaseByTypeCreator() to not
find any databases when I know that more than one database of the searched
type and creator ID are installed?

I tried installing an application called PDBBrowse (you can view PDB files
on your Palm using it), but when it scans for all databases, it doesn't
display the pdb files I created.  When I use DmFindDatabase() it finds
whichever database I asked for.  Could I have done something wrong when
creating the pdb files, even though HotSync didn't compain?

Mark Lenz
(920) 832-3523
[EMAIL PROTECTED]


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

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





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

Reply via email to