I am using PODS to create a 68k application.
I am storing a string from a TextBox into a character pointer. The reason I am
storing it in a charcter pointer is because I need it to be of variable length
and using a character pointer seems to be the best way to do this.
When I write this data to a database and then export the database to a text
file I get the correct number of characters, but the characters are not ASCII
and not the text string I intended to save.
If I use a character array it works fine except that the unused spaces have
NULL characters in them which I don't want.
When I step through the debugger in PODS the character pointer, when viewed as
StringC shows the proper string, but when it's stored to the database it's
stored using the character encoding. Any suggestions?
Here's some relevant code:
struct
{
char openFlag[3];
char cardID[8];
char separator2;
char *EventType; //Using EventType[15] works but is not Variable
char separator3;
char myDate[7];
char separator4;
char myTime[8];
char terminator;
} Data;
.
.
.
char * pEventType;
pField = FrmGetObjectPtr(pForm, FrmGetObjectIndex(pForm, ListID)); pEventType =
FldGetTextPtr(pField);
StrCopy(Data.EventType, pEventType);
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/