Subject Re: [IBO] TIBODataset Problem with M/D
Author Jason Wharton
Thanks, this will be in the next sub-release.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com

-- We may not have it all together --
-- But together we have it all --


----- Original Message -----
From: "hans" <hans@...>
To: <ibobjects@yahoogroups.com>
Sent: Saturday, January 11, 2003 8:08 PM
Subject: [IBO] TIBODataset Problem with M/D


> Hello Jason,
>
> I found a problem in TIBODataset with M/D.
>
> Linked Detail fields of ftLargeInt (Decimal(18,0) are not or properly
> populated in the Detail records upon a Detail Append or Insert.
>
> I found a simple code change to IBODataset.pas solves this problem.
>
> ==================================
>
> procedure TIBODataset.GetValuesFromMaster;
> var
> ii: integer;
> tmpField: TField;
> NewField: TField;
> tmpDataset: TDataset;
> tmpCol: TIB_Column;
> begin
> if Assigned(FDataLink.DataSource) then
> begin
> tmpDataset := FDataLink.DataSource.Dataset;
> if Assigned(tmpDataset) then
> if tmpDataset.Active and (tmpDataset.State <> dsSetKey) then
> begin
> with InternalDataset.Params do
> for ii := 0 to InternalDataset.Params.ColumnCount - 1 do
> begin
> tmpCol := InternalDataset.Params.Columns[ii];
> tmpField := tmpDataset.FindField(tmpCol.FieldName);
>
> if Assigned(tmpField) then
> begin
> NewField := Self.FindField(tmpCol.FieldName);
> if Assigned(NewField) and NewField.IsNull then
> begin
>
> //---- Hans added
>
> {$IFDEF IBO_VCL40_OR_GREATER}
> if NewField.DataType = ftLargeInt then
> NewField.AssTring := tmpField.AsString
> else
> {$ENDIF}
> //-----
> NewField.Assign(tmpField)
>
> end;
> end;
> end;
> end;
> end;
> end;
>
> ============================
>
> I hope my code change is acceptable
>
> Best Regards
> Hans