[V4Rev]Valentina equivalent of revDataFromQuery

Trevor DeVore lists at mangomultimedia.com
Wed Jun 16 08:49:44 CDT 2010


On Jun 15, 2010, at 8:59 PM, Kay C Lan wrote:

> At his point all I'm trying to replicate is revDataFromQuery; ie  
> extract actual data, not a cursor.

Use VDatabase_SQLSelectRecords. Here is the code I use in the  
dbconn_retrieveQueryAsData command of SQL Yoga. Hopefully it is helpful.

if sConnectionsA[ pConnectionA["database"] ][ pConnectionA["name"] ] 
["valentina client connection id"] > 0 then
                 put "kServerSide" into theLocation
             else
                 put "kClientSide" into theLocation
             end if
             if the keys of pBindingsA is not empty then
                 put VDatabase_SQLSelectRecords( theConnectionID,  
pSQL, theLocation, "kReadOnly", "pBindingsA", 1, -1, \
                         pColDel, pRowDel, "", "", "", "") into pOutData
             else
                 put VDatabase_SQLSelectRecords( theConnectionID,  
pSQL, theLocation, "kReadOnly", "", 1, -1, \
                         pColDel, pRowDel, "", "", "", "") into pOutData
             end if
             put _valentinaError(theConnectionID) into theError

-- 
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com



More information about the Valentina mailing list