Page 1 of 1

IsValid Function not Working for "Numeric" Type

Posted: Fri May 07, 2010 11:28 am
by rager
Hi,
I have been trying to put in validation checks for a few decimal fields. I saw in one of the forums (viewtopic.php?t=125952&highlight=for+sc ... imal%5C%22) that IsValid("Decimal"...) will give the following warning if the number has no precision.
"Parsing parameters "" for schema type "decimal": Expected precision; got: <eof>"

I am getting this error even when I have precision.

I tried using "Numeric" and I got the following error:
"Invalid type: Numeric."

I have also tried a few other combinations. I am getting an error for all of them.

The input datatype to this function is Varchar(50) - I wanted to put in a validation as users can manipulate this value and I have already had an issue once.

Has anyone come across this before?

Warm Regards,

Posted: Fri May 07, 2010 5:10 pm
by ray.wurlod
Would the Num() function be adequate for your purpose?

Posted: Mon May 10, 2010 2:55 am
by rager
Hi Ray,
Thanks a lot for the suggestion. It works fine.