Subject | Setting an Integer Param with String - No Exception raised |
---|---|
Author | Michael L. Horne |
Post date | 2002-07-19T06:41:49Z |
Hello,
I was working on a project which allowed the user to enter
different search methods which I then set in the Query.
When the user entered a text value in the Edit that would
be placed into a Integer Param I did not get the exception
which I expected.
Here is the code where the exception is handled in IBO:
File: IBA_Column.Imp, line 2711.
procedure TIB_ColumnInteger.SetAsString( const NewValue: string );
.....
try
Value := StrToInt( tmpVal );
except
// In Delphi 3 it doesn't seem to know how to reciprocate the
value.
if IntToStr( Low( integer )) = tmpVal then
Value := Low( integer );
end;
Looks to me like there should be a "raise" in that exception????????
What do you all think???? I can work with it either way, just wasn't
what I expected to happen.
Michael L. Horne
I was working on a project which allowed the user to enter
different search methods which I then set in the Query.
When the user entered a text value in the Edit that would
be placed into a Integer Param I did not get the exception
which I expected.
Here is the code where the exception is handled in IBO:
File: IBA_Column.Imp, line 2711.
procedure TIB_ColumnInteger.SetAsString( const NewValue: string );
.....
try
Value := StrToInt( tmpVal );
except
// In Delphi 3 it doesn't seem to know how to reciprocate the
value.
if IntToStr( Low( integer )) = tmpVal then
Value := Low( integer );
end;
Looks to me like there should be a "raise" in that exception????????
What do you all think???? I can work with it either way, just wasn't
what I expected to happen.
Michael L. Horne