oRS:QueryResult() AND Fw_arrayToDbf

Post Reply
User avatar
vilian
Posts: 987
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

oRS:QueryResult() AND Fw_arrayToDbf

Post 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.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: oRS:QueryResult() AND Fw_arrayToDbf

Post 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()
Regards

G. N. Rao.
Hyderabad, India
User avatar
vilian
Posts: 987
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: oRS:QueryResult() AND Fw_arrayToDbf

Post by vilian »

Thank you ;)
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Post Reply