UNIDAC 5.3.8, Firebird, StoredProcedure returns NULL instead of 0
Posted: Wed 07 May 2014 15:27
Hello,
the result from a SP contains a field called ARTIKELTYP defined as SMALLINT DEFAULT 0
1. running the SP this way returns NULL instead of 0 for the above field!
accessing the field like aIntValue := DM.SP_GET_ARTIKELBYID.FieldByName ( 'ArtikelTyp' ).AsInteger throws an exception "Field 'ARTIKELTYP' cant't be accessed as Type Integer".
2. running the SP via a simple query like this returns the correct value -> 0 (integer)
#1 worked fine in 5.2.7 but fails in 5.3.8
greets
Erich
the result from a SP contains a field called ARTIKELTYP defined as SMALLINT DEFAULT 0
1. running the SP this way returns NULL instead of 0 for the above field!
Code: Select all
DM.SP_GET_ARTIKELBYID.PrepareSQL ( true );
DM.SP_GET_ARTIKELBYID.ParamByName ( 'P_ID_ARTIKEL' ).AsInteger := bcID;
DM.SP_GET_ARTIKELBYID.Open;2. running the SP via a simple query like this returns the correct value -> 0 (integer)
Code: Select all
DM.queryTemp.SQL.Clear;
DM.queryTemp.SQL.Add ( 'SELECT * FROM SP_GET_ARTIKELBYID( ' + IntToStr( bcID ) + ' )' );
DM.queryTemp.Open;greets
Erich