Hi Jan,
The problem is a bit more complex.
During testing, I noticed that when using FreeTDS, TEXTSIZE is
initialized depending on the version of Delphi and Lazarus and MSSQL on:
0
10000000
1073741823
2147483647
ADD:( More precisely, FColumnLengths [ColumnIndex] in line
stBytes: if FColumnLengths [ColumnIndex] <= 0
it takes on such values)
Added to this is the fact that the user can set it SET TEXTSIZE - to any value.
Therefore, for a long time, I propose to introduce this CURRENT_TEXTSIZE for use by ZEOS where it is necessary and by the user when he needs.
Michał
zMemtable
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: zMemtable
Hello Michal,miab3 wrote: ↑18.06.2022, 17:07 Hi Jan,
The problem is a bit more complex.
During testing, I noticed that when using FreeTDS, TEXTSIZE is
initialized depending on the version of Delphi and Lazarus and MSSQL on:
0
10000000
1073741823
2147483647
ADD:( More precisely, FColumnLengths [ColumnIndex] in line
stBytes: if FColumnLengths [ColumnIndex] <= 0
it takes on such values)
Added to this is the fact that the user can set it SET TEXTSIZE - to any value.
Therefore, for a long time, I propose to introduce this CURRENT_TEXTSIZE for use by ZEOS where it is necessary and by the user when he needs.
Michał
i totally agree with you - in the long term we need a better handling of these things. But for me this it a two step process:
- Fix the problem for TEXTSIZE=2147483647
- Fix it for other settings of TEXTSIZE
Re: zMemtable
Here is a test for the D10.3-Win32 ZEOS8trunk_r7817(7816) with your freetds-1.3.12.zip.
Sequence of actions:
-Open (ZTable)
-Clone (ZTable to ZMemTable)
-Save (ZMemTable to file) - ERROR
With my fix, this error was not there.
Michał
Sequence of actions:
-Open (ZTable)
-Clone (ZTable to ZMemTable)
-Save (ZMemTable to file) - ERROR
Code: Select all
procedure TForm1.Button2Click(Sender: TObject);
var fs: TFileStream;
begin
fs := TFileStream.Create('t2code.bin', fmCreate);
Try
ZMemTable1.SaveToStream(fs);
Finally
fs.Free;
End;
end;
Michał
You do not have the required permissions to view the files attached to this post.