Dear sir, I have the following code :
DIM sRain AS String
DIM iRain AS Integer
DIM iPos AS Integer
DIM iYear AS String
DIM iMonth AS String
modMain.Connect
hRes = modMain.$Con.Exec("SELECT * FROM table")
FOR EACH hRes
iPos = hRes!id
iYear = hRes!yr
iMonth = hRes!mn
sRain = hRes!r1
' PRINT iPos, iYear, iMonth, sRain
iRain = CInt(sRain)
IF iRain > 100 THEN PRINT iPos, iYear, iMonth
NEXT
on this line : iRain = CInt(sRain)
I got the type mismatch error.
This is my first try to program on gambas.
So why the error happened ? Any suggestion to fix are welcome.
FYI, the database connected successfully, hRes!r1 is a string, sRain is
a string, and I'd like to get the integer value of sRain.
The possible value of sRain is : "0", "1", "2", "x", "-", NULL.
Help !
I'm using gambas2 2.8.2 on linux mint 7.
Thanks in advance.
Regards,
Sulchan
signature.asc
Description: PGP signature
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
