Ошибка при выполнении SQL запроса к базе данных 'datai': unable to use function MATCH in the requested context
SELECT X,Y,Z FROM T WHERE Z LIKE '%TEXT<b>1</b>%' AND Y LIKE '%TEXT<b>1</b>%'
doc:=TPath.Combine(TPath.GetDocumentsPath, 'index.html');
memo1.Lines.LoadFromFile(doc);
WebBrowser1.LoadFromStrings(Memo1.Text, 'https://index.local');
procedure TForm1.FDConnection1BeforeConnect(Sender: TObject);
begin
{$IF DEFINED(iOS) or DEFINED(ANDROID)}
FDConnection1.Params.Values['Database'] :=
TPath.Combine(TPath.GetDocumentsPath, 'main_v3.sdb');
FDConnection1.Params.Values['DriverID'] :='SQLite';
// FDConnection1.Params.Values['Password'] :='алгоритм-шифрования'+':' +'пароль';
FDConnection1.Params.Values['Password'] :='aes-128'+':' +'1';
{$ENDIF}
end;
procedure Form1.ListView1ItemClick(const Sender: TObject;
const AItem: TListViewItem);
var
i: Integer;
imcc: string;
BlobStream: TStream;
begin
i:=AItem.Tag;
Label2.Text:=IntToStr(i);
FDQuery2.Close;
FDQuery2.SQL.Clear;
FDQuery2.SQL.Add('select imc from vdb WHERE id='+IntToStr(i));
FDQuery2.OpenOrExecute;
if
imcc='i'
then
FDQuery2.Close;
FDQuery2.SQL.Clear;
FDQuery2.SQL.Add('select imd from vdb WHERE id='+IntToStr(i));
FDQuery2.OpenOrExecute;
BlobStream := FDQuery2.CreateBlobStream(FDQuery2.FieldByName('imd'), TBlobStreamMode.bmRead);
if (FDQuery2.FieldByName('imd').AsString = FDQuery2.FieldByName('imd').AsString)
then Image1.Bitmap.LoadFromStream(BlobStream);
Panel1.Visible:=True;
procedure Form1.ListView1ItemClick(const Sender: TObject;
const AItem: TListViewItem);
var
i:integer;
begin
i:=Listview1.Tag;
Label2.Text:=IntToStr(i);
end;
procedure Form1.ListView1ItemClick(const Sender: TObject;
const AItem: TListViewItem);
var
i:integer;
begin
i:=FDQuery2.FieldByName('id').AsInteger;
Label2.Text:=IntToStr(i);
end;
procedure Form1.sEdit2ChangeTracking(Sender: TObject);
var
i, id : Integer;
m,SQL,rs : string;
begin
ListView1.Items.Clear;
FDQuery2.Close;
FDQuery2.Active:=True;
FDQuery2.SQL.Clear;
SQL := 'SELECT id, text, FROM vdb WHERE text MATCH :search ORDER BY rank';
FDQuery2.SQL.Text := SQL;
FDQuery2.ParamByName('search').AsString := '^'+sEdit1.Text+'*';
FDQuery2.Open;
ListView1.BeginUpdate;
for i:=0 to FDQuery2.RecordCount -1 do
begin
mr:=(FDQuery2.FieldByName('text').AsString);
id:=(FDQuery2.FieldByName('id').AsInteger);
ListView1.Items.Add.Data['txtMain'] := mr;
ListView1.Items.Item[i].Tag:=id;
ListView1.Selected := ListView1.Items[0];
FDQuery2.Next;
end;
ListView1.EndUpdate;
end;