I don't open the database myself. The resources are in the application database which
is opened be launching the application. However this did make me think whether I
could re-open the database and I came up with this work around. I get the names of
all the open databases and then reopen the open which matches my application name.
------------
while (NULL != (openDB = DmNextOpenDatabase(openDB))) { // cycle through all
open databases
// get the database ID
DmOpenDatabaseInfo(openDB, &dbID,0,&modeP,0, &resDB);
// get the database name
DmDatabaseInfo ( 0, dbID,szName,0,0,0,0,0,0,0,0,0,0 );
// if it's the correct database then reopen as read-write
if (0 == StrCompare(szName, "eventlog")) {
DmOpenDatabase(0, dbID, dmModeReadWrite);
}
}
--------------
This seems to work but is not a tidy solution. If anyone has a better idea please let
me know.
----------------------------------------------------------------------
Subject: RE: Resize Resource Problem
From: "William F. Weiher III" <[EMAIL PROTECTED]>
Date: Wed, 21 Jun 2000 09:09:01 -0600
X-Message-Number: 26
Did you open the database as read-only?. If so, try opening it as read-write
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, June 21, 2000 06:46
To: Palm Developer Forum
Subject: Resize Resource Problem
Hi All,
I have created a string resource with Constructor and I am trying to
resize it in my application using the following code snippet:
{
resourceHandle = DmGetResource('tSTR', TesterString);
resourceHandle = DmResizeResource(resourceHandle,
MemHandleSize(resourceHandle) +1);
err = DmGetLastErr();
}
This always fails with the error 516 (dmErrReadOnly). I guess my
application database has been opened as read only. My question is
how can I change the mode of the application database to be writable?
Thanks in advance,
Andrew Wishart
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
----------------------------------------------------------------------
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/