Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

22001 String Or Binary Value will be Truncated

Status
Not open for further replies.

hegartyjp

Programmer
Jun 16, 2004
57
US
Does any one know why this message is coming up when I try and insert a record in the table on SQL Server.

I am using Access and an ODBC link.

This was not happening before.

Any help would be greatly appreciated

Thanks
 
That happens when you attempt to put too much data in to a field. For example, suppose you have a Name field defined as VarChar(10), but you try updating a record (or inserting a new record) that has a name larger than 10 characters.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
yes, the value of the data is greater than the size of the column

for example

create table TestSize (Col1 varchar(6))
--no problem
insert into TestSize values ('abcde')
-- here is your message
insert into TestSize values ('abcdeXXX')


Denis The SQL Menace
SQL blog:
Personal Blog:
 
Thanks so much.

I think someone must have changed the table I was inserting into as the field was smaller.

I did not know what the error was for though so thank you for saving me a few hours of searching.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top