I have a database table with a decimal(25) datatype. The data from this column is loaded into a variable in VB.NET. There are no calculations done on the variable in .NET. Shall I use a decimal data type or a String datatype in .NET?
The same database field is used in a VB6 application. No calculations are done on the field in VB6. What is the best datatype to use in VB6?
The only time the variable is used in either program is as follows:
If variable <> 0 Then
'Do some logic
End If
Generally, being strongly typed is better, but from your question it wouldn’t seem to matter. Personally, I would make it a decimal because what if a calculation were needed to be done on it in the future? You never know what the next developer will be doing to your code so always try to make it as robust as you can.