Hi,
I don't know if you have ever had this problem, little strange. I have a database driven website (Windows 2000 + MSSQL2000). I have another database driven website (Windows 2000 + MSSQL 2000). I have the exactly same table on two different databases (Table X). Datatypes of the 3 fields are smallmoney, smallmoney and decimal(4,2).
On one web site following code works:
...
data = rs.getrows
if data(0,0) <> 0 and data(1,0) <> 0 THEN
' blah blah
end if
On another it gives me type mismatch error unless I make the changes:
...
data = rs.getrows
if cdbl(data(0,0)) <> 0 and data cdbl(data(1,0)) <> 0 THEN
' blah blah
end if
I cannot get a sum either unless I convert all of them to double one by one. Any clues why does it act like that?
I don't know if you have ever had this problem, little strange. I have a database driven website (Windows 2000 + MSSQL2000). I have another database driven website (Windows 2000 + MSSQL 2000). I have the exactly same table on two different databases (Table X). Datatypes of the 3 fields are smallmoney, smallmoney and decimal(4,2).
On one web site following code works:
...
data = rs.getrows
if data(0,0) <> 0 and data(1,0) <> 0 THEN
' blah blah
end if
On another it gives me type mismatch error unless I make the changes:
...
data = rs.getrows
if cdbl(data(0,0)) <> 0 and data cdbl(data(1,0)) <> 0 THEN
' blah blah
end if
I cannot get a sum either unless I convert all of them to double one by one. Any clues why does it act like that?