Given the low address.

Either the string you're trying to put the DateFormat in is NULL or too
short to hold the value generated ;-)

Make a bigger string and/or allocate the on ya got.
-- 
Matt Disher
[EMAIL PROTECTED]


> 
> Thank you very much for the immediate information.
> Now I changed my code to comparing date objects
> instead of memory locations. It is now working fine.
> But it seems it is a slow process.
> 
> But still I have one run time problem with the code
> snippet ----
> DateToDOWDMFormat (dateTime.month, dateTime.day,
> dateTime.year, ShortDateFormat, label);
> 
> Even my dateTime.month, dateTime.day, dateTime.year
> contain valid values like 3, 14, 2002.
> The error goes like this-
> 
> App(1.0) just wrote to memory location 0x00000204A
> which is in memory manager datastructures.
> These datastrucuters include things like........
> 
> Any guess what is going wrong with my
> DateToDOWDMFormat function.
> 
> Thankyou once again,
> 
> With Regards
> Bhaskar
> 
> 
> 
> 
> 
> From: Schettino, John (view other messages by this
> author) 
> Date: Wed, 13 Mar 2002 13:09:05
> 
> ------------------------------------------------------------------------------
> --
> 
> I think what he was going for was MemMove():
> 
> MemMove((VoidPtr) searchRec,  (VoidPtr) &searchDate,
> sizeof(DateTimeType));
> 
> Something like that I suppose
> 
> -----Original Message-----
> From: Matt Hebley
> [mailto:[EMAIL PROTECTED]]
> 
> 
> At 08:49 AM 13/3/2002 -0800, you wrote:
>> How can I search a database record using date
> field.
>> I want to retrieve all records whose date field
>> matches search date. For this should I use MemSet
>> function to fill the memory location with the search
>> date for the purpose of comparision. If so how can I
>> convert a search date (DateTimeType structer) into
>> byte value.
>> 
>> when I try to use MemSet compiler rising error
>> ----:can not convert struct to unsigned char..... for
>> my code snippet-
>> 
>> searchRec = MemPtrNew(sizeof(dbRec));
>> MemSet(searchRec, sizeof(DateTimeType),
> searchDate);
> 
> MemSet is used to set each byte in a buffer to the
> same value, for example
> setting them all to zero. It looks to me like you need
> a DateTimeType 
> struct in your searchRec (or use a DataTimeType as
> your search object).
> 
> See docs on TimSecondsToDateTime.
> 
> Matt
> 
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage
> http://sports.yahoo.com/
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe, please
> see http://www.palmos.com/dev/support/forums/
> 


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

Reply via email to