March 23, 2003 at 10:28 pm
One of our programmers has created a large INSERT using VB. (That is the VALUES part of the INSERT statment is the union, done in a For loop, of some 70 values). When we try to INSERT it into a table we get "String or binary data would be truncated".
Can SQL pinpont, and report to me, what field(s) is causing the problem? Otherwise, brute force approach here I come.
TIA,
Bill
March 24, 2003 at 1:37 am
Sorry, but I think you're left to brute force.
--
Chris Hedgate @ Apptus Technologies (http://www.apptus.se)
March 24, 2003 at 5:50 am
You should run sp_help tablename in QA, and check all the data types of the columns. There is one column that is conflicting with the insert. In can be numeric, or a char datatype.
March 24, 2003 at 8:27 am
Have the VB developer record what record number he is on at the time of the
error in his err handler. Then take a look at this record. As Racosta suggested
one of the fields will be too long. It will either be too long for the ADO
parameter(if using a Command Object) used or the DB column. You will have to
check both. Then you have two choices : increase the length allowed or truncate
the data manually using LEFT$ in VB.
Tim C.
//Will write code for food
Tim C //Will code for food
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply