Page 1 of 1
binary data shifted
Posted: 08.10.2020, 07:58
by hoedlmoser
Hi,
The GetData() method in version 7.3 (r6881) now returns binary values shifted 2 bytes,
eg. for binary(16) =
0x000000FF0000000000000000000000FF
GetData() returns
0x1000000000FF00000000000000000000
Seems that the first 2 bytes contain the length of the binary instead of data.
kind regards
hoedlmoser
Re: binary data shifted
Posted: 08.10.2020, 17:23
by EgonHugeist
Hello hoedlmoser,
if it's a TVarBytesField descendant:
http://docwiki.embarcadero.com/Librarie ... BytesField
if it's a fixed size TBytesField, i would agree..
So what's the field definition?
Re: binary data shifted
Posted: 12.10.2020, 09:26
by hoedlmoser
Hi Michael,
its a fixed size binary, like described in the example
kind regards
hoedlmoser
Re: binary data shifted
Posted: 18.10.2020, 10:49
by EgonHugeist
Me again,
What's the TField.DataType? If it's ftBytes than that's done by compiler. I added a testcase to see if Zeos correctly is able to determine BINARY/VARBINARY. Yet no issues to see.
Re: binary data shifted
Posted: 19.10.2020, 16:01
by hoedlmoser
hi again,
TField.DataType returns "ftVarBytes". This is on a 32 bit Lazarus 1.8.2
kind regards
hoedlmoser
Re: binary data shifted
Posted: 29.10.2020, 19:20
by EgonHugeist
Still not able to reproduce your ussue.
So give me all informations of:
1. Exact Version and ProductName of the Server
2. Exact Version and ProductName of the Compiler
3. Exact Version and ProductName of the library or OLEDB/ODBC version
you are using. On my side all tests are passing, that's annoying to get to bugga you're talking about.
Re: binary data shifted
Posted: 29.10.2020, 20:19
by marsupilami
EgonHugeist wrote: ↑29.10.2020, 19:20
1. Exact Version and ProductName of the Server
2. Exact Version and ProductName of the Compiler
3. Exact Version and ProductName of the library or OLEDB/ODBC version
I assume it still is SQL Server 2000 and FreeTDS
->
viewtopic.php?f=38&t=127062
Re: binary data shifted
Posted: 02.11.2020, 12:09
by hoedlmoser
hi,
1. Exact Version and ProductName of the Server
MS SQL 2000 Standard 32 bit with sp4 running on a 64 bit server
2. Exact Version and ProductName of the Compiler
I dont know how to get an "exacter" version of the compiler than the one i mentioned above
3. Exact Version and ProductName of the library or OLEDB/ODBC version
The library is a sybdb.dll 32 bit (provided with "zeoslib-code-0-r6881-branches-testing-7.3.zip", there is no other suitable one)
Protocol of the ZConnection is set to 'mssql' (the only one that works)
Note: The compiler is running on my work station inside a WXP-VM which i need for maintainance purposes of the old Delphi 7 projects, but I dont think that this causes any interferences
kind regards,
hoedlmoser
Re: binary data shifted
Posted: 02.11.2020, 14:58
by marsupilami
hoedlmoser wrote: ↑02.11.2020, 12:09
The library is a sybdb.dll 32 bit (provided with "zeoslib-code-0-r6881-branches-testing-7.3.zip", there is no other suitable one)
Protocol of the ZConnection is set to 'mssql' (the only one that works)
This one is really old. Most probably it is a 0.9x version. Please use something current. With Delphi 7 the versions using libiconv from our files section on sourceforge should be best suited:
https://sourceforge.net/projects/zeoslib/files/3rd%20party/FreeTDS/
Best regards,
Jan
Re: binary data shifted
Posted: 17.12.2020, 07:00
by EgonHugeist
Hello hoedlmoser,
i finally was able to fix the described issue by
https://sourceforge.net/p/zeoslib/code-0/7180/
Note FreeTDS it's self tags all columns as "variable", which is a bug from my POV. But with the metadata in conjunction the fixed/variable types should be seen corectly now.