#1 2012-01-25 13:00:22

noobies
Member
Registered: 2011-09-13
Posts: 139

how change table data without using sql?

some modification code

TSQLTable
public
  property TableSortParams: TSQLTableSortParams read fSortParams;

TSQLTableToGrid = class (TComponent)
public
  property Table: TSQLTable read fTable write fTable;

Need to update Drawgrid without flicker and shift the cursor position, and are used in the following procedure:

procedure TfrmMain.RefreshRowPatients;
var
   tsp: TSQLTableSortParams;
begin
   tsp: = TablePatients.TableSortParams;
   TablePatients: = Database.ExecuteList ([], sqlFillGrid);
   if tsp.FieldType <> sftUnknown
     TablePatients.SortFields (tsp.FieldIndex, tsp.Asc);
   ttgPatients.Table: = TablePatients;

   dgPatients.Invalidate;
end;

it works, but if you want to change the value of a field have to re-recreate the table TablePatients
Is it possible to how some way to make changes directly to the table without having to call a sql

Offline

#2 2012-01-25 13:14:40

Leander007
Member
From: Slovenia
Registered: 2011-04-29
Posts: 113

Re: how change table data without using sql?

No, it is not yet official possible (only if you change source code), but it is on roadmap. See the last valid point about BriefCase model.


"Uncertainty in science: There no doubt exist natural laws, but once this fine reason of ours was corrupted, it corrupted everything.", Blaise Pascal

Offline

#3 2012-06-27 11:32:16

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,240
Website

Re: how change table data without using sql?

I've just updated the roadmap about this point:

update: perhaps not worth it since we can now export SynDB or mORMot results as TClientDataSet: why reinvent the wheel when it is not a perfect match with our ORM and SOA design?

So perhaps not worth it.
In all cases, not on the highest priority any more.
In a stateless model, it does not make much sense to use such an implementation pattern.

Event-Sourcing makes better sense to me as an implementation pattern in such case.

Offline

Board footer

Powered by FluxBB