[Gambas-user] type mismatch: wanted integer, got string instead

MSulchan Darmawan bleketux at ...626...
Tue Aug 25 07:40:59 CEST 2009


Pada Mon, 24 Aug 2009 23:00:07 -0600
Dimitris Anogiatis <dosida at ...626...> menulis:

> this way iRain would always have an integer and you wouldn't have to
> worry about
> the mismatch error... assuming "0", "1", "2", "x", "-" and NULL are
> the only values
> used in your database.

Thanks Dimitris and JY,

Unfortunately, the possible values are more then that, it's just a
sample.
The values are amount of rainfall data, so it has numbers (0 to 400)
also with floating number 0.5, 1.7, and so on.
The field of old data on the database was set with string type, which
"x" represent as a value less then 0.5, "-" represent as no rain, and
NULL represent as no data.

So, for temporary solution, I'll use TRY statement to exclude "x", "-",
and NULL, but the problem is with the floating number.
I don't know how to handle this yet.
any idea how to solve this ?

thanks in advance,
Regards,
Sulchan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20090825/9584ae11/attachment.sig>


More information about the User mailing list