MariaDB RS updating oChild after append

MariaDB RS updating oChild after append

Postby fraxzi » 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 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
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: MariaDB RS updating oChild after append

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

Re: MariaDB RS updating oChild after append

Postby fraxzi » Mon Oct 29, 2018 2:27 am

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


Hi Rao,

I did this:
Code: Select all  Expand view  RUN

...
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  Expand view  RUN

...
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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 78 guests