The client application is written in Delphi using the DevExpress vcl , I connect to the MS SQL server. I connect to the database in the DataSourse ADOQuery .
Faced with this kind of problem:
Change the field value:
procedure TForm24.cxButton2Click(Sender: TObject); begin DM.tviezdi.edit; Dm.Tviezdi.FieldByName('Выезд').AsString := 'Да'; DM.Tviezdi.post; showmessage ('Аварком '+cxDBLookupComboBox3.Text+' назначен') end; It seems to be changed and displayed in the grid (Changed by Avark to Yakovlev) link text
I run the filter
procedure TForm13.cxButton5Click(Sender: TObject); begin dm.Tviezdi.Active := false; dm.Tviezdi.SQL.clear; Dm.Tviezdi.SQL.Add('set language Russian set dateformat dmy '); // Dm.Tviezdi.SQL.Add('select *'); Dm.Tviezdi.SQL.Add('select '); Dm.Tviezdi.SQL.Add('[dbo].[Дата последнего изменения состояния дела]([dbo].[БД].[№ Заявки]) [Дата последнего изменения состояния дела],'); Dm.Tviezdi.SQL.Add('[dbo].[Просрочка состояния дела]([dbo].[БД].[№ Заявки])[Просрочено],'); Dm.Tviezdi.SQL.Add('[dbo].[БД].[№ Заявки] idLoss,'); Dm.Tviezdi.SQL.Add('*'); Dm.Tviezdi.SQL.Add('FROM [dbo].[БД]'); Dm.Tviezdi.SQL.Add('LEFT JOIN [dbo].[Фото инфо]'); Dm.Tviezdi.SQL.Add('ON [dbo].[Фото инфо].[№ заявки] = [dbo].[БД].[№ Заявки]'); DM.Tviezdi.SQL.Add('WHERE 1=1'); DM.Tviezdi.SQL.Add('-- find'); Dm.Tviezdi.SQL.Add('AND([Дата осмотра] >= '+#39+cxDateEdit1.Text+#39')'); Dm.Tviezdi.SQL.Add('and ([Дата осмотра] <= '+#39+cxDateEdit2.Text+#39')'); Dm.Tviezdi.SQL.Add('Order By [№ Заявки] Desc'); Dm.Tviezdi.ExecSQL; dm.Tviezdi.Active := true; end; And I see the old data (Uvarov became the avark as he was), that is, the field was enrolled in the grid, but there is no database. I can not understand what the problem is. However, if the filter is not run, the data is for some reason saved, and after applying the filter, nothing can be changed.