Customize assignDBRow?

Tranborg

New Member
Has anybody tried to customize assignDBRow in your SDO?

I want to completely DISCONNECT progress default when add, copy and update record in my table.

I have my own MyCreateRecord.p

But I want to use Progress toolbar for view and update viewers/ browsers.


I do as follows in my SDO

PROCEDURE assignDBRow:
DEFINE INPUT PARAMETER phRowObjUpd AS HANDLE NO-UNDO.

/* Code placed here will execute PRIOR to standard behavior. */

RUN MyCreateRecord.p.

/* RUN SUPER( INPUT phRowObjUpd). */
/* Code placed here will execute AFTER standard behavior. */

END PROCEDURE.


It seems to works with copy and update, but not very well with add. Progress ADM2 goes out of sync and I get progress errors because I commented out the RUN SUPER.


OK... so I tried to put my RUN MyCreateRecord.p. in pre/ begin/ endTransactionValidate with a RETURN "Message".
But the undo transaction will also back out the work MyCreateRecord.p does.



Any suggestion were to put my code is highly preciated.


(ADM2 or not is the question)
 

MSilva

New Member
Hi,

The suggested way to do that is using ENDTRANSACTIONVALIDATE, but you can't return a message, returning a message means to ADM2 that your transaction MUST be UNDONE... Just do: RETURN .

Suggested locations to override :

SubmitRow
pre/begin/end/postTransactionvalidate

and remember using pre and post you'll be outside the transaction.

Regards

Mauricio Silva
 

Tranborg

New Member
Thanks MSilva

I say "I want to completely DISCONNECT progress default when add, copy and update record in my table. "

Therefore I can't do RETURN "" beacuse I don't want Progress to do the update. My database will be logically corrupt if a normal update/add/copy or delete is performed on my table. Only MyCreateRecord.p is allowed to write on the database.


Now I will try to override commitTransaction and delete the RUN SUPER there instead. If that is no good I will try your suggestion submitRow.

I beleve submitRow has a bigger scope than commitTransaction and assignDBRow.


Thanks again for Your interest of my problem.
:)
 

MSilva

New Member
That's OK,

Now I'see what you want...

Just remember (if it matters...) that if you have another transaction ocurring during all other ADM2 stages, you'll have 2 splitted transactions ocurring at different times.

Anyway . Good Luck

Mauricio Silva
 
Top