mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 06:39:34 +02:00
* 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:
parent
d3004d2bf6
commit
493064a241
@ -713,11 +713,11 @@ var Param : POCIParam;
|
|||||||
|
|
||||||
FieldType : TFieldType;
|
FieldType : TFieldType;
|
||||||
FieldName : string;
|
FieldName : string;
|
||||||
FieldSize : integer;
|
FieldSize : cardinal;
|
||||||
|
|
||||||
OFieldType : ub2;
|
OFieldType : ub2;
|
||||||
OFieldName : Pchar;
|
OFieldName : Pchar;
|
||||||
OFieldSize : sb4;
|
OFieldSize : ub4;
|
||||||
OFNameLength : ub4;
|
OFNameLength : ub4;
|
||||||
NumCols : ub4;
|
NumCols : ub4;
|
||||||
FOciDefine : POCIDefine;
|
FOciDefine : POCIDefine;
|
||||||
@ -736,6 +736,12 @@ begin
|
|||||||
|
|
||||||
for tel := 1 to numcols do
|
for tel := 1 to numcols do
|
||||||
begin
|
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
|
if OCIParamGet(FOciStmt,OCI_HTYPE_STMT,FOciError,Param,tel) = OCI_ERROR then
|
||||||
HandleError;
|
HandleError;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user