in your examples
DmStrCopy (reportdbptr, 0, newReport.str);
-or-
DmWrite(reportdbprt, 0, newReport.str,
StrLen(newReport.str));

newReport.str is still a char pointer (char* str).  This isnt what you mean,
right?

Should i define my report to be:
typedef struct {
        char str;
}report;

if so, doesnt this str variable only hold one char?  how do i get it to hold
a string of char, without using a char array?

Ray


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Joe
Programmer
Sent: Friday, October 05, 2001 2:10 PM
To: Palm Developer Forum
Subject: Re: Simple question about storing char* in a database


> I have been trying to store a character string into
> the database w/ no avail.
...
> typedef struct{
>       char* str;
> }report;
...
> report newReport;
...
>       DmWrite(reportdbptr, 0, &newReport,
> sizeof(newReport));

You are trying to write a pointer to the database.
What good will that pointer be when you exit your app
and return to it?  (no good at all)

What you need to do is to write the string of chars to
the database.  For example,

DmStrCopy (reportdbptr, 0, newReport.str);
-or-
DmWrite(reportdbprt, 0, newReport.str,
StrLen(newReport.str));


__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just
$8.95/month.
http://geocities.yahoo.com/ps/info1

--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to