MariaDB RS updating oChild after append

Post Reply
User avatar
fraxzi
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines
Contact:

MariaDB RS updating oChild after append

Post by fraxzi »

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 content of oRs:oChild:oChild wasn't updated ???

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
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: MariaDB RS updating oChild after append

Post by nageswaragunupudi »

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

G. N. Rao.
Hyderabad, India
User avatar
fraxzi
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines
Contact:

Re: MariaDB RS updating oChild after append

Post by fraxzi »

nageswaragunupudi wrote:I understood your point.
Let me check. I will get back to you.
Hi Rao,

I did this:

Code: Select all

...
oRs:AddChild( oConnection:RowSet('pettyempl'), { "idfund = oRs:id" } )
oRs:AddChild( oConnection:RowSet('pettycash'), { "idfund = oRs:id AND idempl = oRs:oChild:idempl" } )
...
 
to update:

Code: Select all

...
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
Post Reply