Error: Parameter has a wrong data type

This forum is for eXpress++ general support.
Message
Author
skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Error: Parameter has a wrong data type

#1 Post by skiman »

Hi,

I see this kind of error very regulary. I don't understand it. In the args you can see that there are two numeric values. In the operation there is val > val and it gives the error.

The line where the error appears is a simple:
If nSales > 0


oError:args :
-> VALTYPE: N VALUE: 0
-> VALTYPE: N VALUE: 0
oError:canDefault : N
oError:canRetry : N
oError:canSubstitute: Y
oError:cargo : NIL
oError:description : Parameter has a wrong data type
oError:filename :
oError:genCode : 2
oError:operation : <0> > <0>
oError:osCode : 0
oError:severity : 2
oError:subCode : 3
oError:subSystem : BASE
oError:thread : 4
oError:tries : 0

Could this be a memory problem or something?
Best regards,

Chris.
www.aboservice.be

reganc
Posts: 257
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: Error: Parameter has a wrong data type

#2 Post by reganc »

For what it's worth, I have seen hundreds of these types of error (along with persistent db* errors which I still have no clue how to resolve).

I asked Alaska about this error at one point and they could not give me a straight answer.

The problem is always one of not being able to replicate it on demand. If we could replicate it, Alaska might have a chance to fix it. I presume that you haven't been able to replicate it?

If there is already a fix and I haven't noticed, I'm going to be most upset... :-)
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

Koverhage
Posts: 150
Joined: Mon Feb 01, 2010 8:45 am

Re: Error: Parameter has a wrong data type

#3 Post by Koverhage »

I have this error only (1.99.355) with
division with 0
or
the result is too large 0.000000000000000000000000000000000000000000000000000
Klaus

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Error: Parameter has a wrong data type

#4 Post by rdonnay »

You can trap this kind of error in the error handler if you can see some consistent error information.
Do you have a history in your xpperror.log file?
The eXpress train is coming - and it has more cars.

reganc
Posts: 257
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: Error: Parameter has a wrong data type

#5 Post by reganc »

rdonnay wrote: Thu Nov 05, 2020 9:57 am You can trap this kind of error in the error handler if you can see some consistent error information.
Do you have a history in your xpperror.log file?
Hi Roger

I'm sure it's easy enough to trap. But what would you do then?

Ignore it and allow the program to continue?

I receive emails of all errors our customers have (provided the auto-emailing function in our application can sent them).
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Error: Parameter has a wrong data type

#6 Post by skiman »

Hi,

I have an errorlog which is send to me when an error occurs at a customer site.
As Regan said, there are two kind of errors:
- db-errors, which are always solved after reindexing. These are sometimes reproducable, and disappear after a re-index.
- Parameter has a wrong data type which doesn't make any sense in most of the cases. Sometimes a var is already evaluated with no problems some lines before, and suddenly in a next evaluation the error is generated. The solution I sometimes add in the code is if valtype(nVar)=="N".and. nVar>0 but this is not a solution.

Anyway, thank's for the responses. Looks as I'm not the only one with this problem, which is comforting me. :-)
Best regards,

Chris.
www.aboservice.be

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: Error: Parameter has a wrong data type

#7 Post by Auge_Ohr »

hi,

Index Error of DB most are based on DBESYS
show us your DBESYS
greetings by OHR
Jimmy

reganc
Posts: 257
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: Error: Parameter has a wrong data type

#8 Post by reganc »

I was curious about the history of this occurring, so I checked my error logs.

And although I did receive a large number of these errors...

I hadn't realised that I hadn't received an error log like this since Jun 2018.

So my memory has failed me here. I don't quite understand what changed unless it was an update of some kind.

Chris, out of interest, what Xbase++ version are the errors from?
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Error: Parameter has a wrong data type

#9 Post by rdonnay »

I'm sure it's easy enough to trap. But what would you do then?

Ignore it and allow the program to continue?
Yes, I have written error handlers that trap divide by zero errors.
The line of code that errors would be simply ignored.

CASE oError:genCode == XPP_ERR_ZERODIV
RETURN 0
The eXpress train is coming - and it has more cars.

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Error: Parameter has a wrong data type

#10 Post by skiman »

Hi Regan,

I'm still using 1.9.355.
Best regards,

Chris.
www.aboservice.be

Post Reply