Ralph,
First off, you can save space by saving the date/time as a DateTime type
instead of two char strings with the added bonus of being able to respect
the user's display preference...
Secondly here is my psuedo code for writing to the DB using the following
structure
struct myFoo
{
DateTimeType m_Date;
char* m_DescStr;
}
if valid memory chunk then
get size of m_Date and strlen + 1 of m_DescStr
write myFoo structure to db (note: single DmWrite here)
check for errors
release record
reading the record will then just be a matter of doing the MemHandleLock;
note that in your code posted that you may be writing less than
time/dateStringLength characters and so you can not be guaranteed that the
cast will be properly aligned.
Take a look at the Mail client code to see particularily DB writing code if
you insist on using char* in your structs.
ttfn.
E/.
________________________________________________________
This message sent using the Infowave Wireless Business Engine(tm)
Evan Wise
Sprite Herder
infowave
E: [EMAIL PROTECTED]
T: 604 473 3779
F: 604 473 3633
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/