- Код: Выделить всё
SQLQueryWrite.SQL.Add('INSERT INTO persons (fio, age, district_id, address, dateopen) VALUES (:StrFIO, :StrDR, (SELECT district.id FROM district WHERE district.name = :StrDistrict), :StrAddress, :StrDateOpen);');
SQLQueryWrite.Params.ParamByName('StrFIO').AsString:= StrFIO;
SQLQueryWrite.Params.ParamByName('StrDR').AsString:= StrDR;
SQLQueryWrite.Params.ParamByName('StrDistrict').AsString:= StrDistrict;
SQLQueryWrite.Params.ParamByName('StrDateOpen').AsString:= StrDateOpen;
SQLQueryWrite.Params.ParamByName('StrAddress').AsString:= StrAddress;
SQLQueryWrite.ExecSQL;
а при выводе в гриде отображается дата как 20.04.2006. Что-то с форматами не то.