mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 21:19:31 +02:00
parent
c2db154121
commit
c9a2067b61
@ -847,6 +847,7 @@ Var tmpRecBuffer : PBufRecLinkItem;
|
||||
NullMask : pbyte;
|
||||
|
||||
begin
|
||||
inherited InternalPost;
|
||||
if assigned(FUpdateBlobBuffers) then for i:=0 to length(FUpdateBlobBuffers)-1 do
|
||||
if assigned(FUpdateBlobBuffers[i]) and (FUpdateBlobBuffers[i]^.FieldNo>0) then
|
||||
begin
|
||||
|
@ -924,6 +924,25 @@ begin
|
||||
ShowException(ExceptObject,ExceptAddr);
|
||||
end;
|
||||
|
||||
procedure TDataSet.InternalPost;
|
||||
|
||||
Procedure Checkrequired;
|
||||
|
||||
Var I : longint;
|
||||
|
||||
begin
|
||||
For I:=0 to FFieldList.Count-1 do
|
||||
With FFieldList[i] do
|
||||
// Required fields that are NOT autoinc !! Autoinc cannot be set !!
|
||||
if Required and not ReadOnly and
|
||||
(FieldKind=fkData) and Not (DataType=ftAutoInc) and IsNull then
|
||||
DatabaseErrorFmt(SNeedField,[DisplayName],Self);
|
||||
end;
|
||||
|
||||
begin
|
||||
Checkrequired;
|
||||
end;
|
||||
|
||||
procedure TDataSet.SetUniDirectional(const Value: Boolean);
|
||||
begin
|
||||
FIsUniDirectional := Value;
|
||||
@ -1878,19 +1897,6 @@ end;
|
||||
|
||||
Procedure TDataset.Post;
|
||||
|
||||
Procedure Checkrequired;
|
||||
|
||||
Var I : longint;
|
||||
|
||||
begin
|
||||
For I:=0 to FFieldList.Count-1 do
|
||||
With FFieldList[i] do
|
||||
// Required fields that are NOT autoinc !! Autoinc cannot be set !!
|
||||
if Required and not ReadOnly and
|
||||
(FieldKind=fkData) and Not (DataType=ftAutoInc) and IsNull then
|
||||
DatabaseErrorFmt(SNeedField,[DisplayName],Self);
|
||||
end;
|
||||
|
||||
begin
|
||||
if State in [dsEdit,dsInsert] then
|
||||
begin
|
||||
@ -1899,7 +1905,6 @@ begin
|
||||
{$ifdef dsdebug}
|
||||
writeln ('Post: checking required fields');
|
||||
{$endif}
|
||||
CheckRequired;
|
||||
DoBeforePost;
|
||||
If Not TryDoing(@InternalPost,OnPostError) then exit;
|
||||
cursorposchanged;
|
||||
|
@ -1131,7 +1131,7 @@ type
|
||||
procedure InternalInitRecord(Buffer: PChar); virtual; abstract;
|
||||
procedure InternalLast; virtual; abstract;
|
||||
procedure InternalOpen; virtual; abstract;
|
||||
procedure InternalPost; virtual; abstract;
|
||||
procedure InternalPost; virtual;
|
||||
procedure InternalSetToRecord(Buffer: PChar); virtual; abstract;
|
||||
function IsCursorOpen: Boolean; virtual; abstract;
|
||||
procedure SetBookmarkFlag(Buffer: PChar; Value: TBookmarkFlag); virtual; abstract;
|
||||
|
Loading…
Reference in New Issue
Block a user