Icon View Incident Report

Minor Minor
Reported By: Mark Culos [Blackberry Civil Works]
Reported On: 3/8/2015
For: Version 2.18 Build 3
# 4148 Trying to CAST a Single Minus (-) Sign to an Integer Value Results in an Unhandled Exception

The function shown in the code to reproduce is intended to allow character data to be cast as integer and when invalid numeric text is handed to the function, return a zero value.

All works fine except when the input text is a single negative sign (i.e., - ) and in that case, the function returns null. When I input two negative signs I get the expected zero return and any other combination that I try also seems to return zero.

CREATE FUNCTION "ToNumber" (IN "OrderNum" VARCHAR(50) COLLATE "UNI")
RETURNS INTEGER
BEGIN
	DECLARE Result INTEGER DEFAULT 0;
	
	BEGIN
		SET Result = Cast(OrderNum, Int);
	EXCEPTION
	END;
	RETURN Result;
END



Resolution Resolution
Fixed Problem on 3/10/2015 in version 2.18 build 4


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB LCL Standard with Source
ElevateDB PHP Standard
ElevateDB PHP Standard with Source
ElevateDB PHP Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image