Different results returned from an ASE stored procedure

For an ASE stored procedure, for example the following one, the results returned from the installable cloud app and the PowerBuilder C/S app might be different.

CREATE PROCEDURE g_qaQuestionSelect
DECLARE @quest_seq tinyint, @ErrorMessage varchar(255)
SELECT @quest_seq = NULL
 IF @quest_seq = NULL   /* here is the error checking @quest_seq = NULL ,  currently fixed it using  IsNull(@quest_seq,0) = 0 */
      SELECT @ErrorMessage = 'ERROR.'
      SELECT @ErrorMessage = 'DONE.'


The PowerServer installable cloud application connects to ASE through the ODBC driver, while the PowerBuilder C/S app connects to ASE through the native driver. The default values of Set ANSI Null option in these two drivers are different.


De-select the Set ANSI Null option in the ODBC Data Source Administrator.