[EMAIL PROTECTED] wrote:
hi ,
I have declared a structure as
typedef struct
{
char Name[10];
char * notes;// pointer created for getting the Note
// contents
}Ascend;
then in my application in ctlselect event
I am writing Name(from name feild) as well the note(from Note from) contents in database thru following write statement
DmWrite(aptr,0,&a,sizeof(size));
here 'size' is calculated of the Name feild and note
'aptr' is pointer to structure
'a' is instance of structure
the problem here is when I run my program i cannot see all of contents in database
ie if neel is entered ih Name feild
and attached note is hi how r u?
then only two leeters of name is seen in database
ie ne
any help will greatly appreciated
One problem is that the 'notes' data is NOT contained in the structure.
Only the pointer to the note is in the structure, the actual data is
elsewhere. You would want to do something more like...
DmWrite(aptr,0,a.name,10);
DmWrite(aptr,10,a.notes,MemPtrSize(a.notes));
Bob.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/