Jul 05, 2019 02:03 PM|mgebhard|LINK
The error is telling you that tmpTbl("Com") is not formatted a decimal and therefore the command fails. For example, "1A2" would fail.
Keep in mind, we cannot see the data or the table schema. I recommend basic troubleshooting to find the value of tmpTbl("Com"). Once you know that basic bit of information you'll probably be able to solve the problem. Use the Visual Studio debugger to
step through your code.
IMHO, it's much easier to format the result using T-SQL than C#. Given your code I assume the main issue is the decimal in SQL has more than 2 significant figures?