NJordan72
asked on
SQL Error "String or binary data would be truncated"
I was inserting some stuff into a database today and got the following error "String or binary data would be truncated." I hadn't seen it before. I looked at my code and coudln't find anything wrong. I then retried the INSERT with the EXACT same data, and it worked fine. Have any idea what the error is or where it comes from?
If you tried the insert with the same data then it implies that it it is not just the values that are too long.
How were you doing the insert that fails.
I suspect your test was via query analyser and there is something in the interface that failed previously.
How were you doing the insert that fails.
I suspect your test was via query analyser and there is something in the interface that failed previously.
ASKER
I was doing the insert via an Activer Server Page.
Okay, post your ASP code, then let's see it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
For example:
tabel: PRODUCT
field: productname varchar(10)
You do this:
INSERT INTO Product('1234567890123')
It will raise the error.