[patch_done] Wrong parameter type SmallInt vs. Byte
[patch_done] Wrong parameter type SmallInt vs. Byte
Hello. Method IZPreparedStatement.SetByte have wrong datatype for parameter Value. There is ShortInt, but should by Byte or bigger unsigned type. In my case this caused cut of all values bigger than 127 a store them as 0! I replace this datatype and all works well. Sorry for my poor english.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Alfa000,
don't worry about your english!
Can you explain some more details?
don't worry about your english!
Can you explain some more details?
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/
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/
Explain is simple:
Interface IZPreparedStatement have this method:
but correct declaration should by like this:
What you say?
I don't have time for precise reproducing problem now. But if i was trying store whole byte range (from 0 to 255) with IZPreparedStatement.SetByte and IZPreparedStatement.ExecuteUpdatePrepared, then values greather than 127 was stored as 0 in database. If i replace parameter declaration "Value: ShorInt" for "Value: Byte", then whole range from 0 to 255 is stored ok.
Interface IZPreparedStatement have this method:
Code: Select all
procedure SetByte(ParameterIndex: Integer; Value: ShortInt);
Code: Select all
procedure SetByte(ParameterIndex: Integer; Value: Byte);
I don't have time for precise reproducing problem now. But if i was trying store whole byte range (from 0 to 255) with IZPreparedStatement.SetByte and IZPreparedStatement.ExecuteUpdatePrepared, then values greather than 127 was stored as 0 in database. If i replace parameter declaration "Value: ShorInt" for "Value: Byte", then whole range from 0 to 255 is stored ok.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Alfa000,
i think you are right! Which database are you using for? I'll check your suggestion. If i can't find new issues, i'll commit the patch to SVN.
Edit: Patch done R2247 /testing7.1 (SNV)
Thank you.
i think you are right! Which database are you using for? I'll check your suggestion. If i can't find new issues, i'll commit the patch to SVN.
Edit: Patch done R2247 /testing7.1 (SNV)
Thank you.
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/
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/