This works ============ StrCopy(record.Date, "34857384573498573498");
This fails ============= StrCopy(record.Date, encDate); It says that "Application just read from memory location X which is the unused portion of the stack. The stack is the area of RAM used to contain function parameters and local variables. Applications may access the area of the stack above the stack pointer, but not below it." All I want to to is get the value of encDate into record.Date. I cant see why this is failing unless I am missing something. Any ideas? Thanks, Ed. John Leung wrote: > Try replace the following line > > Char *encDate = "34857384573498573498"; > > with > > Char encDate[] = "34857384573498573498"; > > Also, have you ever tried the following before? > > StrCopy(record.Date, "34857384573498573498"); > > >> The I can only assume what you have left out of your example, but with these > >> assumptions it is correct it should be > >> > >> typedef struct RecData { > >> Char Date[256]; > >> } RecData; > >> > >> void AddToDateDatabase(RecData* v); > >> > >> void foo() > >> { > >> RecData record; > >> Char *encDate = "34857384573498573498"; > >> StrCopy(record.Date, encdate); // Generally better > >> use StrNCopy() and clear out the last Char (not byte!) > >> error = AddToDateDatabase(&record); > >> > >> } > >> -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/