Harvey,
OK, well you can easily check the result of the calculation to see if the result is too large then take whatever action you wish. Alternately you could limit the multipler depending on the input number. It is hard to make an educated suggestion without knowing exactly what is happening in your code (and the theory behind it).
Below is some sample code which uses a temporary error trapping routine during a portion of your code. You could adapt this to your needs. It may be more difficult to do this than the above since you are in a different part of your code (the save routine).
Regards,
James
- Code: Select all Expand view
Local oError, bOldError
// .... your code
lRetVal := .T.
bOldError := ErrorBlock( {|oErr| Break( oErr ) } )
Begin Sequence
dbUseArea( lNewArea, cDriver, cDbfFile, cAlias, ! lExclu, lReadOnly )
Recover Using oError // this error object is created automatically by the error handler
NetError(.T.)
lRetVal := .F.
If oError:osCode == 2 // file not found
// you handle it as you feel appropiate
endif
End Sequence
ErrorBlock( bOldError ) // very important to restore original error handler!