Hi
My lazarus version is 1.04 , fpc 2.6.0 , cpu icore 5 and my so is windows xp 32 bit.
I use sqlite as db.
I need copy my table on memory and search field on it.
I write my application but when use locate of tsqlquery for searching in a column it find wrong row of table.
It find a row with a string that begin and i don't use loPartialKey as option
I have attach my sqlite db .
my unit example is
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, sqlite3conn, sqldb, db, FileUtil, Forms, Controls,
Graphics, Dialogs, DBGrids, StdCtrls, DbCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Datasource1: TDatasource;
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
SQLite3Connection1: TSQLite3Connection;
SQLQuery1: TSQLQuery;
SQLTransaction1: TSQLTransaction;
procedure Button1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
SQLQuery1.Locate('cod_age','FA0160',[]);
ShowMessage(IntToStr(SQLQuery1.RecNo));
end;
end.
showmessage return 21 but correct row is 823
Someone could help me to understand why it doesn't work ?