FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour MariaDB RS updating oChild after append
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
MariaDB RS updating oChild after append
Posted: Thu Oct 25, 2018 12:34 AM

Hi Masters,

I have oRs:oChild and oRs:oChild:oChild ..

but oRecA := oRs:oChild:Record(,.F.) and oRacB := oRs:oChild:oChild:Record(,.T.) was saved by oRecA:save() and oRecB:save(), the database confirms the update/appended but even with
oRs:SyncChild() or oRs:oChild:SyncChild(), or oRs:oChild:ReSync() oRs:oChild:oChild:ReSync() .... or :ReQuery or :Refresh() the [u:1ybf8xik]content of oRs:oChild:oChild wasn't updated[/u:1ybf8xik] ???

I couldn't make a small sample since I rely on internal data.. but I know you get the point.

To make it short, how can I refresh/update the content of oRs:oChild:oChild?

:?::?:

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: MariaDB RS updating oChild after append
Posted: Thu Oct 25, 2018 12:12 PM

I understood your point.
Let me check. I will get back to you.

Regards



G. N. Rao.

Hyderabad, India
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: MariaDB RS updating oChild after append
Posted: Mon Oct 29, 2018 02:27 AM
nageswaragunupudi wrote:I understood your point.
Let me check. I will get back to you.


Hi Rao,

I did this:
Code (fw): Select all Collapse
...
oRs:AddChild( oConnection:RowSet('pettyempl'), { "idfund = oRs:id" } )
oRs:AddChild( oConnection:RowSet('pettycash'), { "idfund = oRs:id AND idempl = oRs:idempl" } )
...


to update:
Code (fw): Select all Collapse
...
oRs:oChild:ReQuery({ "idfund = "+cValToChar(aValue[1]) + " AND idempl = "+cValToChar(aValue[2]) })       
oRs:oChild:oChild:ReQuery({ "idfund = "+cValToChar(aValue[1]) + " AND idempl = "+cValToChar(aValue[2]) })
...
oRecFun := oRs:Record()
oRecEmp := oRs:oChild:Record()
oRecPet := oRs:oChild:oChild:Record()
...


This works but I have doubt if this was the optimized and proper way.. Please correct me.

:-)
Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15

Continue the discussion