sqlite select where

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mteirek
Posts: 4
Joined: Wed 04 Sep 2013 10:34

sqlite select where

Post by mteirek » Thu 28 Feb 2019 08:20

i have a problem with 7.4.12


this code worked fine with 7.4.11.
with version 7.4.12, i have sometimes no result.

Code: Select all

function c_sqlite.SelectWhere(qdb, qtable, qWhereVar, qcondition: string;
  qWhereValue: variant): integer;
var qsql : string;
begin
result := -1;
if e_unic.Connected = false then begin
  if connect(qdb, false) = false then exit;
end;


qsql := 'SELECT * FROM ' + qtable + '  WHERE ' + qWhereVar + ' ' + qcondition + ' :qwvalue ;' ;

e_query.Close;
e_query.SQL.Clear;
e_query.SQL.Add(qsql);
e_query.Params.ParamValues['qwvalue'] := qWhereValue ;

try
begin
e_query.Open;
e_query.First;
e_query.Last;
result := e_query.RecordCount;
end;
except
result := -1;
end;


end;

MaximG
Devart Team
Posts: 1477
Joined: Mon 06 Jul 2015 11:34

Re: sqlite select where

Post by MaximG » Thu 28 Feb 2019 15:17

We have made changes to the source code of our product. These changes should eliminate the reasons for the error you described. To make sure of it, we can provide you with a night build of UniDAC with these fixes included.
Please provide the used IDE version and your license number via the e-support form ( https://www.devart.com/company/contactform.html ).

mteirek
Posts: 4
Joined: Wed 04 Sep 2013 10:34

Re: sqlite select where

Post by mteirek » Thu 28 Feb 2019 17:17

for now, i use 7.4.11, and work fine.
will wait next official update.


thanks for help

Post Reply