string or binary data would be truncated

  • Thread starter Thread starter Bernie Yaeger
  • Start date Start date
B

Bernie Yaeger

What causes the error 'string or binary data would be truncated'? Here's
the routine that sometimes causes the error, sometimes not:

irow("ctotal") = FormatCurrency(irow("total"), 2, TriState.False,
TriState.True, TriState.True)
ctotal is a char column in an sql server table; total is a currency column
in the same table. Notwithstanding, the conversion appears to be made, even
though the exception is being thrown.

Any help would be appreciated.

Bernie Yaeger
 
Bernie,

If the variable lengths dont match, then this error occurs.
Make sure that the lengths match. Atleast, make sure that the 'Converted To'
length is greater than the 'Converted From' Length.

Hemanth
 

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

Back
Top