Geoff,

 -- breaking out routines for local vs. server connection


Client selection [server opens all dbs as local connections]:

    replace return with numToChar(29) in itemList
    replace return with numToChar(29) in searchCriteria
requestSDBService sdbBuffer,"find",packArguments(9,exactKey,fieldDelimiter,itemList,setPos ition,searchForward,searchCriteria,cutoffKey,recordDelimiter,unlockRecor d)
    get the result
if not word 1 of it and setPosition then put word 4 of it into sdbPosition
    put it into sdbParameters
    return it

Every db access call has similar logic, but the second and third arguments are unique. To generalize:

    replace return with numToChar(29) in itemList
    replace return with numToChar(29) in searchCriteria
put packArguments(9,exactKey,fieldDelimiter,itemList,setPosition,searchForwa rd,searchCriteria,cutoffKey,recordDelimiter,unlockRecord) into packedArguments
    doGeoffsHandler sdBuffer,"find",packedArguments
    return the result

on doGeoffsHandler @sdBuffer,serviceType,packedArguments
    requestSDBService sdbBuffer,serviceType,packedArguments
    get the result
if not word 1 of it and setPosition then put word 4 of it into sdbPosition
    put it into sdbParameters
    return it
end doGeoffsHandler

I've saved two lines in the original handler...for what--the need to look up another handler to see the full picture?

Rob Cozens
CCW, Serendipity Software Company

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to