Request For TDataRow Example for MariDB

Post Reply
shrifw
Posts: 69
Joined: Fri Aug 28, 2009 5:25 am

Request For TDataRow Example for MariDB

Post 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
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Request For TDataRow Example for MariDB

Post 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

Code: Select all | Expand

oRs:Record():Edit()
OR even much simpler

Code: Select all | Expand

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

Re: Request For TDataRow Example for MariDB

Post 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
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Request For TDataRow Example for MariDB

Post by nageswaragunupudi »

Code: Select all | Expand

? oRec:fieldname
// or
@ r,c GET oRec:fieldname SIZE w,h PIXEL OF oDlg
Finally,

Code: Select all | Expand

oRec:Save()
Regards

G. N. Rao.
Hyderabad, India
shrifw
Posts: 69
Joined: Fri Aug 28, 2009 5:25 am

Re: Request For TDataRow Example for MariDB

Post by shrifw »

Dear Rao Sir ,

Many Thanks ! Its working as expected.

Thanks
Shridhar
Post Reply