Subject Re: 4.9.5: Invalid Text in HexTextToBinary
Author zifnabbe
--- In IBObjects@yahoogroups.com, "zifnabbe" <zifnabbe@...> wrote:
>
> When inserting new data I get the message 'Invalid text in HexTextToBinary'
>
> Looking at the code, the method HexTextToBinary is called from TIBODataset.SetBookmarkData. In this case, BookmarkSize seems to be 36, so 18 is passed in the method as length, but AHexText seems to contain only 'F', thus 1 character...
>


I think I found the solution to this problem, replace the SetBookmarkData method with following code:

procedure TIBODataset.SetBookmarkData( Buffer: TRecordBuffer; Data: Pointer );
var
RecInfo: PIBORecInfo;
begin
RecInfo := PIBORecInfo(Buffer + FRecInfoOfs);
if Assigned( RecInfo.RecRowNode ) then
HexTextToBinary( PAnsiChar( TRecordBuffer( Data )),
RecInfo.RecRowNode.KeyData,
BookmarkSize div 2 );
end;