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