Matt's ODBC wrapper and Mysql

new topic     » goto parent     » topic index » view thread      » older message » newer message

Matt, I'm at a road block using your ODBC wrapper and Mysql. I'm getting
 "out of  memory" reported from XP and the program then crashes with an
 ODBC error.I've tried this with several rather simple programs. I'm 
 simply reading "next larger key" through an inventory file. Here's the
 function that reads next records:

   recDb = execDirectODBC(dbId,"select * from " & openTbNames[t] &
" where dbKey > \""    & lastKey[t] & "\" limit
                               1")


After about 15, 000 records out of 22,300  it croaks with the "out of memory"
issue. I would think that this would not consume all the memory. I have about
150mb available before the program starts. Here's the read loop: I've rem'd out
building the sort table trying to find if the memory issue was caused by my
program.

After this failure the XP computer performance is hosed and never recovers. I
have to reboot to get it back.

  dbRec = readNextDb (icBranch) -- ic Branch read next

       while not EOF[icBranch] do
           icbrKey = dbRec[1]
           icbrRec = dbRec[2]

           if icbrRec[icbrWhseNbr] = whseNbr then
               icmaRec = readDb(icMaster, icbrRec[1])
               if not EOF[icMaster] then

                   if equal(iccoRec[iccoCostCd], "S") then
                       itemCost = icmaRec[icmaStdCost]
                   else
                       itemCost = icmaRec[icmaAvgCost]
                   end if

unitVol = round(max(0,icbrRec[icbrAvgMthlyUse])*12 *
                   itemCost,0)
                   totalVol += unitVol

--sortKeys = append(sortKeys, sprintf("%9d",(999999999 -
                   unitVol)))
                   --fileKeys = append(fileKeys,{icbrKey})
setText(statusBar,"***** Calculating Sales Volumes *****
                   "&icbrKey[1..20])
               else -- if no master then delete it??
tmp = message_box("Branch Item " & icbrRec[1] & " has no
                   master file record","",0)
               end if
           end if

           dbRec = readNextDb (icBranch) -- ic Branch read next

       end while



I  hope you have some idea to explain the of memory failure. The computer 
has 256Mb and there is about 150Mb available before the program launches.

thanks for any help

george

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu