Page 1 of 1
Request For TDataRow Example for MariDB
Posted: Mon Jul 31, 2023 5:40 pm
by shrifw
Dear Rao Sir ,
I would request you to provide TDatarow Examples of Maridb to understand Tdatarow. I have tried existing examples which are not working for me.
Please provide the same. Thanks in advance..!
Thanks
Shridhar
Re: Request For TDataRow Example for MariDB
Posted: Tue Aug 01, 2023 3:34 am
by nageswaragunupudi
Syntax
Code: Select all | Expand
oRec := TDataRow():New( uSource, [cFieldList], [lAppend] )
uSource can be alias(), ado recordset, oRowSet, or any other datasource.
You can:
Code: Select all | Expand
oRs := oCn:RowSet( cTable )
oRec := TDataRow():New( oRs )
oRec:Edit()
OR simply
OR even much simpler
All three alternative codes above do exactly the same thing.
The reason why you do not find many examples directly using TDataRow is because you do not need to deal with it
explicitly.
XBrowse and classes like RowSet, TRecSet, TDatabase. etc implicity internally use this class to provide Edit()
Re: Request For TDataRow Example for MariDB
Posted: Tue Aug 01, 2023 4:58 pm
by shrifw
Dear Sir ,
Not able to access value by using FieldGet Method as given below.
Code: Select all | Expand
oRec := TDataRow():New( oRsList )
ALERT(" acgrp_name ==> "+oRec:FieldGet("ACGRP_NAME") )
Thanks
Shridhar
Re: Request For TDataRow Example for MariDB
Posted: Tue Aug 01, 2023 9:43 pm
by nageswaragunupudi
Code: Select all | Expand
? oRec:fieldname
// or
@ r,c GET oRec:fieldname SIZE w,h PIXEL OF oDlg
Finally,
Re: Request For TDataRow Example for MariDB
Posted: Wed Aug 02, 2023 5:53 am
by shrifw
Dear Rao Sir ,
Many Thanks ! Its working as expected.
Thanks
Shridhar