Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String or Binary data would be truncated
Message
From
24/04/2010 13:47:57
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01461854
Message ID:
01461898
Views:
57
>This problem happens on a SQL insert where the data being inserted is longer than the Database Table field length.
>I am coming up against thiso issue a lot lately and am finding it very time consuming to identify the problem
>I might have a table with 50 fields and on an insert , any one of the fields, could be too long and causing the problem.
>I have had to put some code in each time to display the length of each field.
>Is there any more generic way or tool available to identify where the field size is too big for the table field ?

There is a setting in SSMS you can do. But, I prefer to add it in my data provider at the CommandText level:
oCommand.CommandText = "SET ANSI_WARNINGS OFF; " + oCommand.CommandText
But, see thread # 1310262 for the entire story on this.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform