Jump to content

Q : Why is 'append new record' canceld


Recommended Posts

After the user appends a record i do a OnBeforePost check to see if all fields are filled.


I use this code (like in all my Delphi projects) :


if length(dmPortal.Gast.FieldbyName('LastName').asString) =0 then begin


   MessageDlg('You have to fill the LASTNAME, mtInformation, [mbOK], MessageComponentFocus';





Then the MEssageComponentFocus:


Procedure TdmPortal.MessageComponentFocus(Sender: TComponnt; Res: Integer);


   if sSenderComponent='uniDBEdit_LastName' then begin







For some reason the append will be canceld...which my not be done by the

ABORT. This code works in Delphi application and should also work
in uniGui.


Sugguestions/tips please...i use latest version/build (0.97.1077)


Regards Peter

Link to comment
Share on other sites



The database which is connected to the DB fields is also connected to

the dbgrid and should not be problem (compared to a Win32 application)


How looks you code Farshad...because the abort may not canceld

the append...it just has to 'abort' the action...this is normal behavior ?


I use the same principle as with win32 apps...and i know not all may

compaire...but i don't give a : dmPortal.Gast.CANCEL command

so...till then the append must be 'alive'


The abort is also cancelling the append what you normally do with dmPortal.gast.CANCEL

(like the above sample)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...