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/