How to select data using UniDac from DBF?

The question is a little General as a component of a huge number of settings.
Write a program using UniDac and DBF first time and doubt the correctness of their code.

The code is working. But there are some issues and problems.
base_path:='C\base\'; //Path to the database
//sql_request:='SELECT * FROM BASE1 WHERE N="13116"'; //the Query finds the data
sql_request:='SELECT * FROM BASE1 WHERE F_NAME="John"'; //Query does not find data, and Ivan in F_NAME is.

UniConnection1.ProviderName := 'DBF';
UniConnection1.Database := base_path;
UniConnection1.SpecificOptions.Values['DBFFormat'] := 'dfFoxPro2';
UniConnection1.SpecificOptions.Values['Direct'] := 'True';
UniConnection1.Connect;

UniQuery1.Connection := UniConnection1;
UniQuery1.SQL.Text :=sql_request;
UniQuery1.Open;


sql_result:=UniQuery1.FieldByName('NAME').AsString; //Received data by running a query
records_count:=UniQuery1.RecordCount; //at the same time and find out how many rows
memo1.Lines.Add(inttostr(records_count)); //Derived
memo1.Lines.Add(sql_result); //Derived

UniQuery1.Close;
UniConnection1.Close;

1) SQL query with Russian letters does not work. With English works. Apparently you need something to configure or to convert. What you need to do?
2) am I Correct in thinking that to display all records I need to know their number (UniQuery1.RecordCount) and go through them "shifting" (UniQuery1.Next;)? Usually do, but maybe there's another way.
3) In my code has obvious bugs? Something is not closed, that is not opened up? Wrote the official manual.
March 23rd 20 at 19:18
0 answer

Find more questions by tags DelphiSQL