Page 1 of 1

oRS:QueryResult() AND Fw_arrayToDbf

Posted: Fri Feb 23, 2018 6:53 pm
by vilian
I'm using oRS:QueryResult() to load data in an array, that after I want to save in a DBF file. Something like this:

aValues := oBD:QueryResult( "SELECT * from clients" )
aux->( FW_ArrayToDBF( aValues ) )

If there is only one record in the table clients, this code does not work.

Re: oRS:QueryResult() AND Fw_arrayToDbf

Posted: Fri Feb 23, 2018 11:11 pm
by nageswaragunupudi

Code: Select all | Expand

aValues := oBD:Execute( "SELECT * from clients" )
aux->( FW_ArrayToDBF( aValues ) )
 


Use QueryResult for results containing one or two items
like:
SELECT SUM(AMT) FROM table WHERE..
SELECT AVG(AGE),SUM(SALARY) FROM tabe ..
etc
For reading several rows, use Execute()

Re: oRS:QueryResult() AND Fw_arrayToDbf

Posted: Sat Feb 24, 2018 1:15 pm
by vilian
Thank you ;)