type mismatch retrieving result set

E

eddie wang

The following statement will give me type mismatch error.
interest = rs("CURR_WORKING_INTEREST")
if interest<>0 then ...

But, the following statement will not give me type mismatch error.
interest = round(rs("CURR_WORKING_INTEREST"))
if interest<>0 then ...


I can't use round all the time because result set will be null value.

How to handle this? Thanks.
 
C

Curt_C [MVP]

are you sure that rs("CURR_WORKING_INTEREST") isnt null?
What datatype is it?
Have you tried a CInt() CDbl() etc?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

type mismatch 5
type mismatch when caculating 1
select query data type mismatch 3
<>0 is not working 5
Type mismatch 19
mismatch error 2
type mismatch 2
intermittent type mismatch 1

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top