For instance, I never, ever, ever, want to see the error 'update failed, 0 records'.
By default, it seems this flag is turned on.
so I've had to add code to set record options whenever a table is opened.
However, if I 'miss' a table, I get the error in unexpected places.
Would be SO much easier if I could just set the option on a connection, and the settings were copied to the table when the table is added.
Can you add global settings to connections
Hi, why don't you create a subclass with your preferred default and use only this class as global replacement for tmsquery? or you still don't have any subclass and using tmsquery as is?
BTW I really don't find general setting strictupdate = false to be a correct design pattern... I could count queries with strictupdate = false on my fingers in our code with a few millions of lines...
BTW I really don't find general setting strictupdate = false to be a correct design pattern... I could count queries with strictupdate = false on my fingers in our code with a few millions of lines...
-
wilton_rad
- Posts: 4
- Joined: Fri 10 Sep 2010 14:37
change source
.....SOURCE\DBACCESS.PAS
constructor TDADataSetOptions.Create(Owner: TCustomDADataSet);
begin
inherited Create;
FOwner := Owner;
RequiredFields := True;
StrictUpdate := True; --->> change for False
TrimFixedChar := True;
LongStrings := True;
FlatBuffers := False;
RemoveOnRefresh := True;
FDetailDelay := 0;
UpdateBatchSize := 1;
end;
-------------------
public
constructor Create(Owner: TCustomDADataSet);
property SetFieldsReadOnly: boolean read FSetFieldsReadOnly write FSetFieldsReadOnly default False;
property RequiredFields: boolean read FRequiredFields write SetRequiredFields default True;
property StrictUpdate: boolean read FStrictUpdate write FStrictUpdate default True; -->>change for False
constructor TDADataSetOptions.Create(Owner: TCustomDADataSet);
begin
inherited Create;
FOwner := Owner;
RequiredFields := True;
StrictUpdate := True; --->> change for False
TrimFixedChar := True;
LongStrings := True;
FlatBuffers := False;
RemoveOnRefresh := True;
FDetailDelay := 0;
UpdateBatchSize := 1;
end;
-------------------
public
constructor Create(Owner: TCustomDADataSet);
property SetFieldsReadOnly: boolean read FSetFieldsReadOnly write FSetFieldsReadOnly default False;
property RequiredFields: boolean read FRequiredFields write SetRequiredFields default True;
property StrictUpdate: boolean read FStrictUpdate write FStrictUpdate default True; -->>change for False