472,096 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,096 software developers and data experts.

string or binary data would be truncated

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


Nov 20 '05 #1
1 2715
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

"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message
news:um*************@TK2MSFTNGP10.phx.gbl...
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

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.