Nov 2, 2021 #1 elly00 Technical User Jun 30, 2011 69 IT Hi, I've a field ALQIVA decimal(8,5) If I try to test the content I receive an error of type mismatch the filed cin db sql is 22.00000 The code is; If ALQIVA=22.00 then CODIVA=23 End If
Hi, I've a field ALQIVA decimal(8,5) If I try to test the content I receive an error of type mismatch the filed cin db sql is 22.00000 The code is; If ALQIVA=22.00 then CODIVA=23 End If
Nov 6, 2021 #2 xwb Programmer Jul 11, 2002 6,828 GB You need to examine ALQIVA using vartype. Have a look at https://docs.microsoft.com/en-us/pr...lstudio/aa263402(v=vs.60)?redirectedfrom=MSDN If it is any other type other than 4 or 5 then you need to convert it to either a single or a double. Something like Code: if cdbl(ALQIVA) = 22.00 then CODIVA = 23 end if Upvote 0 Downvote
You need to examine ALQIVA using vartype. Have a look at https://docs.microsoft.com/en-us/pr...lstudio/aa263402(v=vs.60)?redirectedfrom=MSDN If it is any other type other than 4 or 5 then you need to convert it to either a single or a double. Something like Code: if cdbl(ALQIVA) = 22.00 then CODIVA = 23 end if