Page 1 of 1

Another Access bug

Posted: Tue 27 May 2014 09:18
by yeohray2
qryMain is a TUniQuery, connected to an Access database.

Code: Select all

  qryMain.SQL.Text := 'SELECT 1 FROM nonexistingtable';
  try
    qryMain.Execute;
  except
    on E: Exception do
    begin
    end;
  end;

  qryMain.SQL.Text := 'SELECT 2';
  qryMain.Execute;
An exception is raised the first time, because the table does not exist. The SQL is then changed to something that's valid, but on the 2nd execution, TUniQuery runs the original SQL, instead of the new SQL.

I need to use the Execute method instead of Open because I don't know what SQL the user will use.

Re: Another Access bug

Posted: Tue 27 May 2014 10:28
by AlexP
Hello,

Thank you for the information, we have reproduced and fixed the problem, this fix will be included in the next build.