My database field is 16 bytes for a guid:
MYGUID CHAR(16) CHARACTER SET OCTETS
For insert / update I initialize the TUniParam like this:
param.DataType := ftBytes;
param.ParamType := ptInput;
param.Clear;
This is all if the parameter should be set to null.
Now I get an access violation when the TUniQuery should be destroyed. The problem happens in TIBCParamDesc.FreeBuffer for my guid parameter on this line:
Marshal.FreeHGlobal(FValue);
Earlier FValue was allocated a buffer, but only one byte.
What I found is in TIBCParamDesc.SetNull, is the following line that is executed for my guid param object:
Marshal.WriteInt16(FValue, 0);
So this means, two bytes are written here to a buffer of one byte size. Not sure, if something is wrong in my initial code for setting the param or if this is a problem in the UniDac library.
cu Christian
Firebird - problem with ftBytes
Re: Firebird - problem with ftBytes
Thank you for the information. We have fixed the issue with an access violation when clearing a parameter of the ftBytes type. The fix will be included in the nearest UniDAC build.
-
chkaufmann
- Posts: 82
- Joined: Sat 01 Jul 2006 11:42
Re: Firebird - problem with ftBytes
Great. When do you expect the next UniDac build? Just for me to know, if I have to create a work arround for my next build.
cu Christian
cu Christian
Re: Firebird - problem with ftBytes
We are going to release UniDAC next week.