> 
> else if (event->eType == firstUserEvent)
>   {
> 
>     voltagetxt = MemPtrNew(sizeof(Char [5]));
>     record = DmNewRecord(PalmoscopeDB, &index,
> (samples*StrLen(voltagetxt))+1+(StrLen(&recordname[0])));

Well, I didn't look at the rest of the code, but there is
a definate problem here:

StrLen(voltagetxt) returns the length of the string inside voltagetxt.
Well, since you just allocated it and did not assign it,
this will return a undefined value.  But even then, I bet what
you are really wanting to do is:

voltagetxt = MemPtrNew (sizeof (Char)*5);
record = DmNewRecord (PalmoscopeDB, &index,
(samples * sizeof (Char)*5) + 1 + StrLen(&recordname[0])));

Try that and see if it solves your problem.


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to