* Patch from Ludo to preinitialize certain (var)parameters that are only

partially inited in some versions. (Endianess?) Mantis #21596

git-svn-id: trunk@20654 -
This commit is contained in:
marco 2012-03-29 17:39:43 +00:00
parent d3004d2bf6
commit 493064a241

View File

@ -713,11 +713,11 @@ var Param : POCIParam;
FieldType : TFieldType;
FieldName : string;
FieldSize : integer;
FieldSize : cardinal;
OFieldType : ub2;
OFieldName : Pchar;
OFieldSize : sb4;
OFieldSize : ub4;
OFNameLength : ub4;
NumCols : ub4;
FOciDefine : POCIDefine;
@ -736,6 +736,12 @@ begin
for tel := 1 to numcols do
begin
// Clear OFieldSize. Oracle 9i, 10g doc says *ub4 but some clients use *ub2 leaving
// high 16 bit untouched resulting in huge values and ORA-01062
// WARNING: this is not working in big endian systems !!!!
// To be tested if BE systems have this *ub2<->*ub4 problem
OFieldSize:=0;
if OCIParamGet(FOciStmt,OCI_HTYPE_STMT,FOciError,Param,tel) = OCI_ERROR then
HandleError;