binary data shifted

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Post Reply
hoedlmoser
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 24.01.2018, 11:17

binary data shifted

Post 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
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: binary data shifted

Post 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?
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
hoedlmoser
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 24.01.2018, 11:17

Re: binary data shifted

Post by hoedlmoser »

Hi Michael,

its a fixed size binary, like described in the example

kind regards
hoedlmoser
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: binary data shifted

Post 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.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
hoedlmoser
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 24.01.2018, 11:17

Re: binary data shifted

Post by hoedlmoser »

hi again,

TField.DataType returns "ftVarBytes". This is on a 32 bit Lazarus 1.8.2

kind regards
hoedlmoser
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: binary data shifted

Post 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.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: binary data shifted

Post 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
hoedlmoser
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 24.01.2018, 11:17

Re: binary data shifted

Post 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
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: binary data shifted

Post 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
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: binary data shifted

Post 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.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Post Reply