Subject RE: [IBO] Access Violation, Error in FPXSQLVAR.aliasname_length
Author Jason Wharton
Do this in the OnCloseQuery event rather than the OnClose event. By the time
it gets to OnClose, the form is indeed closing already.

Also, your Delphi code doesn't make any sense. Why catch an exception to
immediately re-raise it and then have a line of code after an exception is
raised? Your call to Abort will never happen.

Jason Wharton

-----Original Message-----
From: jaguarius2003 [mailto:jaguarius@...]
Sent: Thursday, July 22, 2004 2:05 PM
To: IBObjects@yahoogroups.com
Subject: RE: [IBO] Access Violation, Error in FPXSQLVAR.aliasname_length


Hi,

I didn't change the close action at all, and I also tried rebuilding
the form from scratch and it didnt help. Here's the formclose code for
one of the forms thats giving me the trouble :

procedure Tdockeditor.FormClose(Sender: TObject; var Action:
TCloseAction);
begin
if modalresult = mrOk then
begin
try
DataAcc.WorkDocket.Post;
except
raise;
Abort;
end;
end
else
DataAcc.WorkDocket.Cancel;
end;

As you can see, the form never actually closes when there is an
exception. There really isn't much code at all on this form, I don't
believe its anything I put in.