Access Violation in query in Delphi XE2 -
I have a query in There is no exception now because the query for the second time has not been assigned. But I have to fire the trigger twice too. How should I assign this query a second time? Full code: Is qryDoABC a component on a form? If so, this is called the second time, if the form is removed, in that case, the form is either released quickly or the query is called late If you manually Release the form, and another query call is the result of an event handler, you can clear the form using the release, it frees the form from when the message queue is handled, so no one left Of Pending messages for qryDoABC function
DoABC . When I call this function for the first time, all the work is fine, but the second time when I call it, on line with qryDoABC, this entry violation throws an exception.
processing TMyForm.DoABC; Start the qryDoABC do - - End; I went googled and found out that I should check whether the query was assigned or if I am now seeing whether the query has been assigned, it would:
processing TMyForm.DoABC; If qryDoABC is assigned then start with qryDoABC - - end;
function TMyForm.DoABC: boolean; If you start with qryDoABCdo, try turning off (qryDoABC) to stop; SQL.Clear; SQL.Text: = 'Some Queries'; Parameters.ParamByName ('ABC'). Value: = ABC; Parameters.ParamByName ('XYZ'). Value: = XYZ; Open; If (Reconcount = 0) results then: = False and initial result: = true; End; Close; End; Except e: Starting an exception result: = false; Go out; End; End; End;
Comments
Post a Comment