Another Access bug

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
yeohray2
Posts: 21
Joined: Thu 08 May 2014 15:49

Another Access bug

Post by yeohray2 » Tue 27 May 2014 09:18

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.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Another Access bug

Post by AlexP » Tue 27 May 2014 10:28

Hello,

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

Post Reply