Brett --------- wrote:
>
> I'm using the DmWrite function to insert into my database. When I call the
> DmQueryRecord() function I get a null everytime. It doesn't matter what
> record I try to access in my database. Should I be inserting using
> DmAttachRecord? I'm not really sure what the problem is. Any help would be
> appreciated. Thanks
DmWrite is not for "writing into a database", its only for writing into
memory different than your normal heap. Whether this area belongs to a
database is a totally different question.
If you want your data ending up in a database you have to tell at which
index and in which database. The "normal" way goes like this:
1.) DmNewRecord (or DmGetRecord) to create (or access) a record
2.) MemHandleLock
3.) DmWrite
4.) MemHandleUnlock
5.) DmReleaseRecord
You can also use a more exotic way by creating an orphaned handle first:
1.) DmNewHandle -- create a handle which may go into the database,
(MemHandleNew would be on your normal heap and won't work)
2.) MemHandleLock
3.) DmWrite
4.) MemHandleUnlock
5.) DmAttachRecord -- now the handle becomes part of the database
6.) DmReleaseRecord
If you want to check whether you data really is in the database,
you might want to try some of the pdb inspecting tools out there.
With kind regards / Mit freundlichem Gru�
Holger Klawitter
--
Holger Klawitter
[EMAIL PROTECTED] http://www.klawitter.de
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/