Yes it is possible.
Only one mistake is DbTip - you are using it as DBType, but that error
was probably created while writting mail... ;)
I have also same code in my app and it is working..
Klemen Dovrtel napsal(a):
>I would like to add records to two databases at the same application. Is that
>possible? I tried this (code below) and it doesn't work, why?
>
>#define DBOkName "OkName"
>#define DBOkID 'OkID'
>static DmOpenRef gDBOk;
>
>#define DBEnName "En"
>#define DBEnID 'EnID'
>static DmOpenRef gDBEn;
>
>#define DBTip 'DATA'
>
>
>
>gDBOk=DmOpenDatabaseByTypeCreator(DBType,DBOkID,dmModeReadWrite);
>if(!gDBOk)
>{ err=DmCreateDatabase(0,DBOkName,DBOkID,DBType,false);
>if(err)
>return err;
>gDBOk=DmOpenDatabaseByTypeCreator(DBType,DBOkID,dmModeReadWrite);
>if(!gDBOk)
>return DmGetLastErr();
>}
>
>gDBEn=DmOpenDatabaseByTypeCreator(DBType,DBEnId,dmModeReadWrite);
>if(!gDBEn)
>{
>err=DmCreateDatabase(0,DBOkName,DBEnID,DBType,false);
>if(err)
>return err;
>gDBEn=DmOpenDatabaseByTypeCreator(DBType,DBEnID,dmModeReadWrite);
>if(!gDBEn)
>return DmGetLastErr();
>}
>
>
>
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/