Alaska Software Inc. - Invalid numeric value error
Username: Password:
AuthorTopic: Invalid numeric value error
Regan CawkwellInvalid numeric value error
on Fri, 12 Jul 2013 11:55:23 +0100
We regularly get an error log from one of our customers with the 
following lines in it:

oError:args         :-> VALTYPE: N - VALUE: -1
oError:canDefault   :.F.
oError:canRetry     :.F.
oError:canSubstitute:.T.
oError:cargo        :NIL
oError:description  :Invalid numeric value
oError:filename     :
oError:genCode      :12
oError:operation    :VAR2CHAR
oError:osCode       :0
oError:severity     :2
oError:subCode      :5
oError:subSystem    :BASE
oError:thread       :5
oError:tries        :0

As you can see the argument is a simple numeric value, in this case 
being used with the VAR2CHAR function and causing the error.

The numeric value is being returned by the EZTWAIN library specifically 
on the following line:

nError := eztw32_AcquireMultiPageFile(0,cFile)

The error actually occurs on the first line that tries to use the 
returned value:

nError := round(val(Var2Char(nError)),0)

As you may guess, that line was added to try to fix the problem but it 
made no difference.  (At least it did not make it any worse 

Can anyone tell me what causes this type of error and the correct way to 
deal with it or convert the value to a 'Valid numeric value'?

Regan Cawkwell
Developer
-------------------------------
Real Business Applications Ltd
-------------------------------
Klaus OverhageRe: Invalid numeric value error
on Fri, 12 Jul 2013 16:44:20 +0200
Reagan,

you could try this

nError := val(str(eztw32_AcquireMultiPageFile(0,cFile),3,0))


Am 12.07.2013 12:55, schrieb Regan Cawkwell:
> We regularly get an error log from one of our customers with the
> following lines in it:
>
> oError:args         :-> VALTYPE: N - VALUE: -1
> oError:canDefault   :.F.
> oError:canRetry     :.F.
> oError:canSubstitute:.T.
> oError:cargo        :NIL
> oError:description  :Invalid numeric value
> oError:filename     :
> oError:genCode      :12
> oError:operation    :VAR2CHAR
> oError:osCode       :0
> oError:severity     :2
> oError:subCode      :5
> oError:subSystem    :BASE
> oError:thread       :5
> oError:tries        :0
>
> As you can see the argument is a simple numeric value, in this case
> being used with the VAR2CHAR function and causing the error.
>
> The numeric value is being returned by the EZTWAIN library specifically
> on the following line:
>
> nError := eztw32_AcquireMultiPageFile(0,cFile)
>
> The error actually occurs on the first line that tries to use the
> returned value:
>
> nError := round(val(Var2Char(nError)),0)
>
> As you may guess, that line was added to try to fix the problem but it
> made no difference.  (At least it did not make it any worse 
>
> Can anyone tell me what causes this type of error and the correct way to
> deal with it or convert the value to a 'Valid numeric value'?
>
Regan CawkwellRe: Invalid numeric value error
on Fri, 12 Jul 2013 16:19:01 +0100
Klaus,

I'll give that a try.

Thanks.

Regan Cawkwell
Developer
-------------------------------
Real Business Applications Ltd
-------------------------------

On 12/07/2013 15:44, Klaus Overhage wrote:
> Reagan,
>
> you could try this
>
> nError := val(str(eztw32_AcquireMultiPageFile(0,cFile),3,0))
>
>
> Am 12.07.2013 12:55, schrieb Regan Cawkwell:
>> We regularly get an error log from one of our customers with the
>> following lines in it:
>>
>> oError:args         :-> VALTYPE: N - VALUE: -1
>> oError:canDefault   :.F.
>> oError:canRetry     :.F.
>> oError:canSubstitute:.T.
>> oError:cargo        :NIL
>> oError:description  :Invalid numeric value
>> oError:filename     :
>> oError:genCode      :12
>> oError:operation    :VAR2CHAR
>> oError:osCode       :0
>> oError:severity     :2
>> oError:subCode      :5
>> oError:subSystem    :BASE
>> oError:thread       :5
>> oError:tries        :0
>>
>> As you can see the argument is a simple numeric value, in this case
>> being used with the VAR2CHAR function and causing the error.
>>
>> The numeric value is being returned by the EZTWAIN library specifically
>> on the following line:
>>
>> nError := eztw32_AcquireMultiPageFile(0,cFile)
>>
>> The error actually occurs on the first line that tries to use the
>> returned value:
>>
>> nError := round(val(Var2Char(nError)),0)
>>
>> As you may guess, that line was added to try to fix the problem but it
>> made no difference.  (At least it did not make it any worse 
>>
>> Can anyone tell me what causes this type of error and the correct way to
>> deal with it or convert the value to a 'Valid numeric value'?
>>
Regan CawkwellRe: Invalid numeric value error
on Tue, 17 Sep 2013 12:22:42 +0100
Klaus,

Just to let you know I amended the line and it still did not work.

I have found PDR 109-6295 (fixed in Hotfix Rollup #36) which appears to relate to a 
similar issue when ActiveX controls are used.

EZTwain is DLL based though so it may not be directly related.

I will be contacting Alaska to see if they can help.

Regan Cawkwell
Developer
-------------------------------
Real Business Applications Ltd
-------------------------------

On 12/07/2013 16:19, Regan Cawkwell wrote:
> Klaus,
>
> I'll give that a try.
>
> Thanks.
>
> Regan Cawkwell
> Developer
> -------------------------------
> Real Business Applications Ltd
> -------------------------------
>
> On 12/07/2013 15:44, Klaus Overhage wrote:
>> Reagan,
>>
>> you could try this
>>
>> nError := val(str(eztw32_AcquireMultiPageFile(0,cFile),3,0))
>>
>>
>> Am 12.07.2013 12:55, schrieb Regan Cawkwell:
>>> We regularly get an error log from one of our customers with the
>>> following lines in it:
>>>
>>> oError:args         :-> VALTYPE: N - VALUE: -1
>>> oError:canDefault   :.F.
>>> oError:canRetry     :.F.
>>> oError:canSubstitute:.T.
>>> oError:cargo        :NIL
>>> oError:description  :Invalid numeric value
>>> oError:filename     :
>>> oError:genCode      :12
>>> oError:operation    :VAR2CHAR
>>> oError:osCode       :0
>>> oError:severity     :2
>>> oError:subCode      :5
>>> oError:subSystem    :BASE
>>> oError:thread       :5
>>> oError:tries        :0
>>>
>>> As you can see the argument is a simple numeric value, in this case
>>> being used with the VAR2CHAR function and causing the error.
>>>
>>> The numeric value is being returned by the EZTWAIN library specifically
>>> on the following line:
>>>
>>> nError := eztw32_AcquireMultiPageFile(0,cFile)
>>>
>>> The error actually occurs on the first line that tries to use the
>>> returned value:
>>>
>>> nError := round(val(Var2Char(nError)),0)
>>>
>>> As you may guess, that line was added to try to fix the problem but it
>>> made no difference.  (At least it did not make it any worse 
>>>
>>> Can anyone tell me what causes this type of error and the correct way to
>>> deal with it or convert the value to a 'Valid numeric value'?
>>>