From: Roger G. <ro...@co...> - 2003-05-09 08:54:04
|
On Wed, May 07, 2003 at 03:11:14PM +0300, Vladimir Tcvigyn wrote: > Hello > > diff -u -r1.5 Sqlda.cpp > > --- IscDbc/Sqlda.cpp 25 Nov 2002 18:58:28 -0000 1.5 > > +++ IscDbc/Sqlda.cpp 7 May 2003 10:32:44 -0000 > > @@ -628,7 +641,7 @@ > > switch (value->type) > > { > > case Null: > > - var->sqltype =3D SQL_LONG; > > + var->sqltype =3D (var->sqltype & ~1) +1; >=20 > In Firebird all fields can be NULL > This superfluous! How can it be uneccesary, it fixes the problem here, on it's own.. I admit the calculation is longwinded, but i'll bet it gets compiled out. Not hat I don't think that 'var->sqltype|=3D1', is better anyway >=20 > for (n =3D 0; n < numberColumns; ++n, ++var) > { > var->sqldata =3D buffer + (long) var->sqldata; > var->sqlind =3D indicators + n; <------------- Always not NULL > } > } You know I check this a didn't see it, oh well. > If to leave > var->sqlind =3D &sqlNull; > Error!!! >=20 > SQL error code =3D -804 > Incorrect values within SQLDA structure > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >=20 > Without a line > memset (var->sqldata, 0, var->sqllen); > Too works! >=20 > But I only of beginnings to test the driver OdbcJdbc with > Microsoft ODBC Test Applicaiont Sorry, I don't understand this, Are you saying that you can't get the MS ODBC Test Application to work without the=20 memset() call? I don't have this Test application but have been testing against my own app, and comparing behaviour with=20 the commerical drivers. > Variant: >=20 > switch (value->type) > { > case Null: > var->sqltype |=3D 1; > *var->sqlind =3D sqlNull; > break; >=20 > Ok? Yup,=20 TTFN --=20 Roger. Home| http://www.sandman.uklinux.net/ Master of Peng Shui. (Ancient oriental art of Penguin Arranging) GPG Key FPR: CFF1 F383 F854 4E6A 918D 5CFF A90D E73B 88DE 0B3E Work|Independent Systems Consultant | http://www.firstdatabase.co.uk/ |