mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-21 01:52:50 +02:00
fcl-db: use proper error message formating when raising DatabaseError. Bug #26014
git-svn-id: trunk@27580 -
This commit is contained in:
parent
98de3c4e40
commit
5eae80ebb0
@ -2148,7 +2148,7 @@ var CurrBuff : pointer;
|
||||
|
||||
begin
|
||||
if not (State in dsWriteModes) then
|
||||
DatabaseError(SNotEditing, Self);
|
||||
DatabaseErrorFmt(SNotEditing, [Name], Self);
|
||||
CurrBuff := GetCurrentBuffer;
|
||||
If Field.FieldNo > 0 then // If =-1, then calculated/lookup field or =0 unbound field
|
||||
begin
|
||||
@ -2802,7 +2802,7 @@ begin
|
||||
else if Mode = bmWrite then
|
||||
begin
|
||||
if not (State in [dsEdit, dsInsert, dsFilter, dsCalcFields]) then
|
||||
DatabaseErrorFmt(SNotEditing,[Name],self);
|
||||
DatabaseErrorFmt(SNotEditing, [Name], Self);
|
||||
if Field.ReadOnly and not (State in [dsSetKey, dsFilter]) then
|
||||
DatabaseErrorFmt(SReadOnlyField, [Field.DisplayName]);
|
||||
|
||||
|
@ -626,7 +626,7 @@ end;
|
||||
|
||||
function TFixedFormatDataSet.GetFieldData(Field: TField; Buffer: Pointer): Boolean;
|
||||
var
|
||||
TempPos, recbuf : PChar;
|
||||
TempPos, RecBuf : PChar;
|
||||
begin
|
||||
Result := GetActiveRecBuf(TRecordBuffer(RecBuf));
|
||||
if Result then
|
||||
@ -668,7 +668,7 @@ var
|
||||
p : Integer;
|
||||
begin
|
||||
if not (State in dsWriteModes) then
|
||||
DatabaseError(SNotEditing, Self);
|
||||
DatabaseErrorFmt(SNotEditing, [Name], Self);
|
||||
GetActiveRecBuf(TRecordBuffer(RecBuf));
|
||||
if Field.FieldNo > 0 then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user