kcscarp
Member
Hello,
I am writing an application on a Windows 7 machine using Delphi 2010, DOA 4.1.2.2, and Oracle 11g.
I am running a "refresh" command on a TOracleDataSet object shortly after inserting a new record. The insertion works fine. I put in a break point and opened PL/SQL Developer to see if the new record was there, and it was, looking just as it should.
However, when I try to refresh the TOracleDataSet object so that the new record is visible, I am getting an access violation error.
I tried replacing the "refresh" with a "close" followed by an "open", and got the same access violation error. The error appears to be triggered on the "close".
The strangest part is that this sequence of code works several times before failing in exactly the same point (my application reads in an XML survey, displays it, and saves the answers in the Oracle database. The failure is always on the same question. I tried rearranging the questions, and the failure occurred on the new question in the same position).
Any suggestions on what to do would be most welcome. Debug messages, etc. are listed below.
Best regards,
Chris
--------------------------------------------------------
Here is the code snippet:
try
dmSurvey.qryNewQuestionRec.Execute;
dmStaff.sessMain.Commit;
except on E: Exception do ShowMessage('Unable to execute query qryNewQuestionRec');
end;
with dmSurvey.dsoraQuestions do
begin
Refresh; //
I am writing an application on a Windows 7 machine using Delphi 2010, DOA 4.1.2.2, and Oracle 11g.
I am running a "refresh" command on a TOracleDataSet object shortly after inserting a new record. The insertion works fine. I put in a break point and opened PL/SQL Developer to see if the new record was there, and it was, looking just as it should.
However, when I try to refresh the TOracleDataSet object so that the new record is visible, I am getting an access violation error.
I tried replacing the "refresh" with a "close" followed by an "open", and got the same access violation error. The error appears to be triggered on the "close".
The strangest part is that this sequence of code works several times before failing in exactly the same point (my application reads in an XML survey, displays it, and saves the answers in the Oracle database. The failure is always on the same question. I tried rearranging the questions, and the failure occurred on the new question in the same position).
Any suggestions on what to do would be most welcome. Debug messages, etc. are listed below.
Best regards,
Chris
--------------------------------------------------------
Here is the code snippet:
try
dmSurvey.qryNewQuestionRec.Execute;
dmStaff.sessMain.Commit;
except on E: Exception do ShowMessage('Unable to execute query qryNewQuestionRec');
end;
with dmSurvey.dsoraQuestions do
begin
Refresh; //