Hi,

if I only work with one database I have no problem, Ican add and
retrieve registries, but if I open another database I think that it
rewrites the first one because I can not retrieve the first
database's registries (I retrieve "" or pointer error(line 4000,nil
Ptr)).
At first time, I had got the same creatorID for both databases and
the type was different. Now they have got different creatorID and
type, different creatorID of the apllication too, for deleting
databases without having to delete the apllication.
Now I open with DmOpenDatabase and I have sawn that databases's ID
are different.
The code is:

  static DmOpenRef gEntrada;
  static DmOpenRef gUbicacion;

  calls:
error=AbrirOCrearDB&gEntradaDB,kEntradaDBType,kEntradaCreator,mode,0,k
EntradaDBName);
error=AbrirOCrearDB&gUbicacionDB,kUbicacionDBType,kUbiCreator,mode,0,k
UbicacionDBName);

  procedure:
Err AbrirOCrearDB(DmOpenRef *dbp,ULong type,ULong creator,ULong
mode,UInt cardNo,char *name)
{
Err     err;
  if (DmFindDatabase(0,name)==0)
  {
    err=DmCreateDatabase(0,name,creator,type,false);
    if (err)
        return err;
    *dbp=DmOpenDatabase(0,DmFindDatabase(0,name),mode);
    if (*dbp==0)
        return DmGetLastErr();
  }
  else
  {
    *dbp=DmOpenDatabase(0,DmFindDatabase(0,name),mode);
    if (*dbp==0)
        return DmGetLastErr();
  }
  return err;
}


    By the way, if I reset the pilot it is happening the same problem
although I only work with one database.


Thanks for advance.
Bye.


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.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