Good night all.
There was such a problem in writing requests, I was not particularly strong, so I tried. Code
var Form1: TForm1; stDay : array[1..7] of string[11] = ('воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота'); stMonth : array[1..12] of string[8] = ('января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'); implementation {$R *.dfm} uses DateUtils;
Here is the request code.
procedure TForm1.Button1Click(Sender: TObject); var st : string; begin st:= FormatDateTime('dd/mm/yyyy',Now); Form1.Query1.SQL[3] := '(ECPsrok = '''+st+''')'; Form1.Query1.Open; if form1.Query1.RecordCount <> 0 then form1.DataSource1.DataSet := Form1.Query1 else begin ShowMessage('На сегодня ничего нет.'); //form1.DataSource1.DataSet := Table1; end; end;
It is registered in query
SELECT * FROM po.db
Frankly, I saw the code on the Internet, I decided to try to write a program using this query. But when you press a button, it knocks out a message
Project Project.exe raised exceptoin class EStringListError with message 'List index out if bounds(3)'.Process stop....
Tell me what could be the error. Advance ATP. I forgot to say that I created a database in the Paradox DBD.