QueryResult 1 row and many rows different array type

QueryResult 1 row and many rows different array type

Postby dutch » Sun Mar 28, 2021 2:49 pm

Dear All,

I use FWMARIADB with MariaDb and I got strange behavior as below;

I use oCon:QueryResult(..).
Result as many rows : got as dimension array
aResult := {{'1','smith', 100 },;
{'2','John', 200 }}

Result as 1 row : got as 1 column array as many rows
aResult := {'1','Smith',100}

But it should be
aResult := {{'1','Smith',100}}

Thanks for any idea or help.
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: QueryResult 1 row and many rows different array type

Postby nageswaragunupudi » Sun Mar 28, 2021 3:33 pm

Please use oCn:Execute( <yourquery> ) to get multi-dim array not oCn:QueryResult() whose purpose is dfferent.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 65 guests