Link to home
Start Free TrialLog in
Avatar of dodgerfan
dodgerfanFlag for United States of America

asked on

Truncate data on insert with c#, sql sever

I have an asp.net form (c# code behind). The form allows users to insert and edit records. Once in a while a user will put in more data into a field than it can handle. This cause the truncated data error. What I would like to do is accept as much as possible from the field and insert that, truncating the rest of the data. Is there a way to do this? Either from the stored procedure or the c# code?
ASKER CERTIFIED SOLUTION
Avatar of dsacker
dsacker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial