In previous versions of VB, changing a string of numerals to a number was easy. Val and convert.todecimal both change 32.75 to 32. What should I be doing here
In previous versions of VB, changing a string of numerals to a number
was easy. Val and convert.todecimal both change 32.75 to 32. What
should I be doing here?
In .Net, I have tried Convert.ToDecimal and Val to convert a text value to Decimal, rior to writing to anAccess database. Both of these give me a truncated value of 32 for an original value of 32.75
Ooops. Further checking ( including another variable whose value I can check) shows that both convert and val are working fine. The problem arises when I am trying to transfer the value to Access. The column in Access is set to expect a decimal value, 2 decimal places accuracy, but for some reason _Access_ is truncating it to Integer
In .Net, I have tried Convert.ToDecimal and Val to convert a text
value to Decimal, rior to writing to anAccess database. Both of these
give me a truncated value of 32 for an original value of 32.75.
Notice that some functions are not locale-aware, so using a comma
character different from the system's comma character will cause wrong
results.
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.