Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String or Binary data would be truncated
Message
De
24/04/2010 13:47:57
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01461854
Message ID:
01461898
Vues:
58
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform