Mohr
User
 Fresh Boarder
| Posts: 7 |   | Karma: 0 |
|
Re:Required: TField.Required;
|
|
Posted: 2007/11/05 10:23 |
|
|
|
|
Hi,
I found the error. Borland/Codegear has changed it's source codes in DB.pas:
former Version (like Delpi 5) was:
procedure TDataSet.Post;
begin
UpdateRecord;
case State of
dsEdit, dsInsert:
begin
DataEvent(deCheckBrowseMode, 0);
<strong>CheckRequiredFields</strong>;
DoBeforePost;
CheckOperation(InternalPost, FOnPostError);
FreeFieldBuffers;
SetState(dsBrowse);
Resync([]);
DoAfterPost;
end;
end;
end;
|
in BDS 2006 the code is:
procedure TDataSet.Post;
begin
UpdateRecord;
case State of
dsEdit, dsInsert:
begin
DataEvent(deCheckBrowseMode, 0);
DoBeforePost;
<strong> CheckOperation(InternalPost, FOnPostError);</strong>
FreeFieldBuffers;
SetState(dsBrowse);
Resync([]);
DoAfterPost;
end;
end;
end;
// and InteralPost ist:
procedure TDataSet.InternalPost;
begin
<strong> CheckRequiredFields;</strong>
end;
|
in NCOCIDB.pas the procedure INTERNALPOST assumes, that CheckRequiredFields has already been called:
procedure TOCIDataSet.InternalPost;
begin
Database.StartWait;
try
if State = dsEdit then begin
FOCICursor.ModifyRecord(nil, POCIBookmark(ActiveBuffer));
UpdateProcessor(skUnLock, [soImmediate, soSave]);
end
else begin
FOCICursor.InsertRecord(POCIBookmark(ActiveBuffer));
UpdateProcessor(skUnLock, [soImmediate, soSave]);
end;
finally
Database.EndWait;
end;
end;
|
So I just added an inherited; to the beginning of the procedure and now it works....
BUT - I don't want to know, what Codegear has changed additionally....
|
|