mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 03:46:10 +02:00
fcl-db: add support for ftFixedWideChar and ftWideMemo into xmldatapacketreader.
git-svn-id: trunk@22997 -
This commit is contained in:
parent
ccead0db7b
commit
544c7d8dbb
@ -65,7 +65,7 @@ implementation
|
|||||||
uses xmlwrite, xmlread, base64;
|
uses xmlwrite, xmlread, base64;
|
||||||
|
|
||||||
const
|
const
|
||||||
XMLFieldtypenames : Array [TFieldType] of String[15] =
|
XMLFieldtypenames : Array [TFieldType] of String[16] =
|
||||||
(
|
(
|
||||||
'Unknown',
|
'Unknown',
|
||||||
'string',
|
'string',
|
||||||
@ -90,8 +90,8 @@ const
|
|||||||
'bin.hex:Ole',
|
'bin.hex:Ole',
|
||||||
'bin.hex:Graphics',
|
'bin.hex:Graphics',
|
||||||
'',
|
'',
|
||||||
'string',
|
'string', // ftFixedChar
|
||||||
'string',
|
'string', // ftWideString
|
||||||
'i8',
|
'i8',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
@ -105,8 +105,8 @@ const
|
|||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'fixedFMT',
|
'fixedFMT',
|
||||||
'',
|
'string', // ftFixedWideChar
|
||||||
''
|
'bin.hex:WideText' // ftWideMemo
|
||||||
);
|
);
|
||||||
|
|
||||||
resourcestring
|
resourcestring
|
||||||
@ -351,13 +351,13 @@ begin
|
|||||||
AField := Fields.FieldByNumber(FieldDefs[FieldNr].FieldNo);
|
AField := Fields.FieldByNumber(FieldDefs[FieldNr].FieldNo);
|
||||||
if (FieldDefs[FieldNr].DataType in [ftBlob, ftBytes, ftVarBytes]) and (s <> '') then
|
if (FieldDefs[FieldNr].DataType in [ftBlob, ftBytes, ftVarBytes]) and (s <> '') then
|
||||||
s := DecodeStringBase64(s);
|
s := DecodeStringBase64(s);
|
||||||
if FieldDefs[FieldNr].DataType in [ftBlob, ftMemo] then
|
if FieldDefs[FieldNr].DataType in [ftBlob, ftMemo, ftWideMemo] then
|
||||||
begin
|
begin
|
||||||
ABufBlobField.BlobBuffer:=ADataset.GetNewBlobBuffer;
|
ABufBlobField.BlobBuffer:=ADataset.GetNewBlobBuffer;
|
||||||
AField.SetData(@ABufBlobField);
|
|
||||||
ABufBlobField.BlobBuffer^.Size:=length(s);
|
ABufBlobField.BlobBuffer^.Size:=length(s);
|
||||||
ReAllocMem(ABufBlobField.BlobBuffer^.Buffer,ABufBlobField.BlobBuffer^.Size);
|
ReAllocMem(ABufBlobField.BlobBuffer^.Buffer,ABufBlobField.BlobBuffer^.Size);
|
||||||
move(s[1],ABufBlobField.BlobBuffer^.Buffer^,ABufBlobField.BlobBuffer^.Size);
|
move(s[1],ABufBlobField.BlobBuffer^.Buffer^,ABufBlobField.BlobBuffer^.Size);
|
||||||
|
AField.SetData(@ABufBlobField);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
AField.AsString := s; // set it to the filterbuffer
|
AField.AsString := s; // set it to the filterbuffer
|
||||||
|
Loading…
Reference in New Issue
Block a user