Request For TDataRow Example for MariDB

Request For TDataRow Example for MariDB

Postby shrifw » Mon Jul 31, 2023 5:40 pm

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
shrifw
 
Posts: 54
Joined: Fri Aug 28, 2009 5:25 am

Re: Request For TDataRow Example for MariDB

Postby nageswaragunupudi » Tue Aug 01, 2023 3:34 am

Syntax
Code: Select all  Expand view
oRec := TDataRow():New( uSource, [cFieldList], [lAppend] )

uSource can be alias(), ado recordset, oRowSet, or any other datasource.

You can:
Code: Select all  Expand view
oRs := oCn:RowSet( cTable )
oRec := TDataRow():New( oRs )
oRec:Edit()


OR simply

Code: Select all  Expand view
oRs:Record():Edit()


OR even much simpler
Code: Select all  Expand view
oRs := oCn:RowSet( cTable )
oRs:Edit()


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

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

Re: Request For TDataRow Example for MariDB

Postby shrifw » Tue Aug 01, 2023 4:58 pm

Dear Sir ,

Not able to access value by using FieldGet Method as given below.

Code: Select all  Expand view


    oRec := TDataRow():New( oRsList )
 
    ALERT(" acgrp_name ==> "+oRec:FieldGet("ACGRP_NAME") )

 


Thanks
Shridhar
shrifw
 
Posts: 54
Joined: Fri Aug 28, 2009 5:25 am

Re: Request For TDataRow Example for MariDB

Postby nageswaragunupudi » Tue Aug 01, 2023 9:43 pm

Code: Select all  Expand view
? oRec:fieldname
// or
@ r,c GET oRec:fieldname SIZE w,h PIXEL OF oDlg


Finally,
Code: Select all  Expand view
oRec:Save()
Regards

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

Re: Request For TDataRow Example for MariDB

Postby shrifw » Wed Aug 02, 2023 5:53 am

Dear Rao Sir ,

Many Thanks ! Its working as expected.

Thanks
Shridhar
shrifw
 
Posts: 54
Joined: Fri Aug 28, 2009 5:25 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 88 guests