Subject | Re: [IBO] Requested change to IBODataset unit |
---|---|
Author | Daniel Rail |
Post date | 2003-09-06T00:09:52Z |
Hi,
At September 5, 2003, 19:41, Matt Nielsen wrote:
Here's the definition in Delphi's help for the Size property, in
regards to TFieldDef.Type:=ftMemo:
"For a BLOB, memo, or graphic field, Size is the number of bytes from
the fields value that are stored in the actual database table."
I think this is change that can be introduced:
begin
NewDataType := ftBytes;
NewDataSize := SQLLen;
end
else
// Maximum String length defined in Delphi.
if SQLLen >= 8192 then
NewDataType := ftMemo
NewDataSize := SQLLen;
else
begin
NewDataType := ftString;
NewDataSize := SQLLen;
// The vcl complains about zero length strings...
if NewDataSize = 0 then
NewDataSize := 1;
end;
I don't know in which version of Delphi the maximum length was
augmented, but I know it is the same between Delphi 5, 6 and 7. So it
would be safe to make this modification.
For Jason, the line in question is located in "procedure
GetDataTypeAndSize" at approximately line number 2462.
--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)
At September 5, 2003, 19:41, Matt Nielsen wrote:
> Here is the piece of code I'm talking about:Did you test this change yourself?
> begin
> NewDataType := ftBytes;
> NewDataSize := SQLLen;
> end
> else
>>>>>>>>>>>>> HERE <<<<<<<<<<<<<<<<<<<
> if SQLLen >= 256 then
> NewDataType := ftMemo
>>>>>>>>>> JUST ADD <<<<<<<<<<<<<<<<<<<<
> NewDataSize := SQLLen;
> else
> begin
> NewDataType := ftString;
> NewDataSize := SQLLen;
> // The vcl complains about zero length strings...
> if NewDataSize = 0 then
> NewDataSize := 1;
> end;
Here's the definition in Delphi's help for the Size property, in
regards to TFieldDef.Type:=ftMemo:
"For a BLOB, memo, or graphic field, Size is the number of bytes from
the fields value that are stored in the actual database table."
I think this is change that can be introduced:
begin
NewDataType := ftBytes;
NewDataSize := SQLLen;
end
else
// Maximum String length defined in Delphi.
if SQLLen >= 8192 then
NewDataType := ftMemo
NewDataSize := SQLLen;
else
begin
NewDataType := ftString;
NewDataSize := SQLLen;
// The vcl complains about zero length strings...
if NewDataSize = 0 then
NewDataSize := 1;
end;
I don't know in which version of Delphi the maximum length was
augmented, but I know it is the same between Delphi 5, 6 and 7. So it
would be safe to make this modification.
For Jason, the line in question is located in "procedure
GetDataTypeAndSize" at approximately line number 2462.
--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)