Subject | Re: 4.9.5: Invalid Text in HexTextToBinary |
---|---|
Author | zifnabbe |
Post date | 2009-09-13T08:49:20Z |
--- In IBObjects@yahoogroups.com, "zifnabbe" <zifnabbe@...> wrote:
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;
>I think I found the solution to this problem, replace the SetBookmarkData method with following code:
> 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...
>
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;