Can you send me a sample on how I would change my code
below to work?

--- Max Bian <[EMAIL PROTECTED]> wrote:
> Hello.
> 
> If you want us to debug it for you, you may want to
> give more details about the
> error.
> 
> For databases that have same creater and type but
> different names, you can use
> DmFindDatabse(cardno, dbname).  it returns the
> LocalID of that database. You
> can then open it and return the handle.  The API
> references will have more
> information.
> 
> Max
> --- Johnathan Smith <[EMAIL PROTECTED]> wrote:
> > I am working on a palm program that needs access
> to
> > more then one database at a time.  If I try using
> diff
> > databse names with the following code the program
> uses
> > the first database it find.  Then if I try to
> change
> > the database type to any thing but "DATA" I get
> > errors. Can someone please look at the following
> code
> > and tell me how to do it
> > 
> > 
> > 
> > 
> > static DmOpenRef OpenRecordDatabase( const Char
> *name,
> >  UInt32 creatorID, UInt32 type )
> > {
> >     UInt16            mode = dmModeReadWrite;
> >     SystemPreferencesType prefs;
> >     DmOpenRef            dbRef;
> >     PrefGetPreferences( &prefs );
> >     if( !prefs.hideSecretRecords ){
> >         mode |= dmModeShowSecret;
> >     }
> >     dbRef = DmOpenDatabaseByTypeCreator( type,
> > creatorID, mode );
> >     if( !dbRef ){
> >         Err err = DmCreateDatabase( 0, name,
> > creatorID, type, false );
> >         if( err != 0 ) return NULL;
> >     
> >         dbRef = DmOpenDatabaseByTypeCreator( type,
> > creatorID,  mode );
> > 
> >     }
> >     return dbRef;
> > } 
> > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Send your FREE holiday greetings online!
> > http://greetings.yahoo.com
> > 
> > -- 
> > For information on using the Palm Developer
> Forums, or to unsubscribe, please
> > see http://www.palmos.com/dev/tech/support/forums/
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
> 
> -- 
> For information on using the Palm Developer Forums,
> or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

-- 
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