how to use this class in parent and child mode.
andykr please help me.
warm regards,
mk.
> i am using a class designed by andykr "updres"
>
> this class works very well with a single table but not working proper with more than one table like
>
>
> llok = tableupdate(.t.,.f.,"inward1") and tableupdate(.t.,.f.,"inward")
>
>
> if a real conflict than i want to take same step for both the tables
>
> Force my changes OR Undo my Change for both the table.
>
> in my save command button
>
> do updbuffer2 with "inward1",thisform.datasessionid,"inward"
>
> but this class works with one alias
>
> attachment is "updres" class
>
http://www.foxite.com/uploads/d54eebe9-4fbf-4503-b3ce-079f951ca1a7.rar>
> below is my "updbuffer2.prg"
>
>
> procedure updbuffer2
> ****
> parameters updbufferalias, updbufferdatasessionid, updbufferalias1
> *Parameters updbufferalias, updbufferdatasessionid
> local llOk, llOk1, oUpd, laErr[1]
> *** Select the main table
> select &updbufferalias && child table
> *** Try and update
> *** If update fails, create the conflict resolution object
> if not empty(updbufferalias1)
> llOk = tableupdate(.t.,.f.,(updbufferalias)) and tableupdate(.t.,.f.,(updbufferalias1))
> else
> llOk = tableupdate(.t.,.f.,(updbufferalias))
> endif
> if ! llOk
> aerror( laErr )
> if laErr[1] = 1585
> oUpd = createobject('updres', updbufferdatasessionid, alias())
> if type( 'oUpd' ) = "O" and ! isnull( oUpd )
> oUpd.show()
> endif
> else
> *** What other error could we get here?
> messagebox( message(), 16, "Whoops!" )
> endif
> endif
> *ENDIF
> *** Refresh the for
>
>
> warm regards,
> mk.