Hello everyone.  
I need some help with DmDetachRecord.  Basically I am wondering what happens
to the MemHandle that is returned if I do not use it (i.e. never call
MemHandleLock on it)??  Will the OS eventually free that memory?

Furthermore, I am sure someone can help me very quickly.  I have a record
from a database.  Now, I want to update a field in that record, what is the
best way to do it?
Sample code would be much appreciated.

Thanks,
Eric Sun
Developer - RAD systems
Q. Data Inc.
4/20/00 1:02 PM

        -----Original Message-----
        From:   Rob Graber [SMTP:[EMAIL PROTECTED]]
        Sent:   Thursday, April 20, 2000 11:56 AM
        To:     Palm Developer Forum
        Cc:     [EMAIL PROTECTED]
        Subject:        RE: Arrays and Pointers issue - HELP!!

        To anyone that looks into this...pay special attention to my arrays
(which
        at least one is an array of pointers)...They are declared in
        BuildReferences, and then I am trying to pass them by reference to
alGetKey,
        and then pass individual elements by value to alFindRecNum. Thanks
for any
        feed back you can give.


        -----Original Message-----
        From: Rob Graber [mailto:[EMAIL PROTECTED]]
        Sent: Thursday, April 20, 2000 11:24 AM
        To: Palm Developer Forum
        Subject: Arrays and Pointers issue - HELP!!


        I am messing with some pointers and multidimensional arrays, and I
belive I
        am following K&R, but CodeWarrior is balking at me.  Any ideas what
my
        problem is?  Sample code is below...I have stripped out all of the
code
        except the declarations and the function definitions...

        The errors I get keep saying:

        Error   : pointer/array required
        Main.c line 973     matchRec = alFindRecNum(keyElems[k],
Values[j][k],
        Sizes[j][k], RecNums[k]);

        Error   : cannot convert
        'short * (*)[7]' to
        'short **'
        Main.c line 1242             pTbl, tmpRow, curElem, keyElems);

        //Sample Code
        static Int alFindRecNum(ElementType *keyElem, IntPtr Values, Int
Size, Int
        startRec)
        {
                return 0;
        }

        static Boolean alGetKey(Int j, Int k, Int NumKeyElems, IntPtr
Values[], Int
        Sizes[],
                                        Int RecNums[], TABLE_REC *pTbl, WORD
tmpRow,
        ElementType *curElem,
                                        ElementType *keyElems[] )
        {
                Int matchRec;

                matchRec = alFindRecNum(keyElems[k], Values[j][k],
Sizes[j][k],
        RecNums[k]);

                return alGetKey(j, k+1, NumKeyElems, Values, Sizes, RecNums,
                                         pTbl, tmpRow, curElem, keyElems);
        }

        static Boolean BuildReferences()
        {

                ElementType     *curElem;
                ElementType *keyElems[7];
                Int i,j,k,m,x;
                WORD    tmpRow, tblIndex;
                TABLE_REC       *pTbl;
                Int             numRecs;
                UInt    recordIndex;
                ULong   CurPosValues, CurPosStrings, CurPosOffsets;
                ULong CurPosKeys[6];
                Int             ValuesSize, valColumn, descColumn;
                IntPtr  Keys[7][7], Values[7][7];
                Int             Sizes[7][7];
                Int             NumKeyElems;
                Int             RecNums[7];
                Err             err;

                if (curElem->KeyElemNums[1] != 0)
                        alGetKey(j, k, NumKeyElems, Values, Sizes, RecNums,
                                 pTbl, tmpRow, curElem, keyElems);


                return true;

        }


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

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



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

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

Reply via email to