Thank you very much for replying to my question. I am a bit confused. Can or
can I not have multiple databases open at the same time? I thought I coudn't
beceause I ran into problems with that while I was developeing my conduit
(in java) and had to make sure that every databae was closed before I opened
the next one (I would get the files open message and I also saw in
documentation that I had to have only one open at a time), It will certainly
make my life easier if the same rule doesn't hold for the c handheld
application. I can then open all the databases up at the start of the
applications and close everything when I exit.
>From: Steve Sabram <[EMAIL PROTECTED]>
>Reply-To: "Palm Developer Forum" <[EMAIL PROTECTED]>
>To: "Palm Developer Forum" <[EMAIL PROTECTED]>
>Subject: Re: Locked records
>Date: Sat, 01 Sep 2001 00:31:50 -0700
>
>
>
>Salma Saad wrote:
>
> > I have several databases in my application and I sometimes need to
>compare
> > the data. Even if I open and read data from db one using the
>DmQueryRecord
> > function in readonly mode and use StrCopy to copy the string that I need
>to
> > a global character array and then close the database I get the locked
> > records message when I open another database and try comparing the
>values.
> > Somehow the data I copied must still point back to data in the other
> > database. I want to copy it to the stack and remove all references to
>the
> > other closed db. how would I do this?
>
>You can't. Once the database is close, the pointer to a record content is
>no good.
>
> > Using DmReleaseRecord doesn't help.
> > It's important to note that I don't get the error message unless I
>access
> > the copied string while comparing it with data in another db using
> > StrCompare.I can access any other database all I want as long as I don't
> > compare using the string copied from the other db. I am using GCC and
>POSE
> > to test.
>
>Frankly, I suggest to review the entire database architeture of you
>application. You can have multiple databases and multiple
>records locked and exposd at the same time. You must remember that
>databases are in a protected memory storage heap and are thus
>not directely accessable all the time as if they were in one big
>application heap.
>
>Steve
>
>
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe,
>please see http://www.palmos.com/dev/tech/support/forums/
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/