What does this error mean " string data, Length mismatch"

What does " string data, Length mismatch" mean I keep getting it when I am trying to upload product to my database.

Thanks
Dane
BoostdrivenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

tolstoyleoCommented:
That's not a very descriptive error...  You may be trying to add a record that is too long for the column in the database?  
If the column "first_name" is defined as [varchar] (50) and you enter a value that is 55 characters long, it will error but usually the error will be "truncating string"... or something to that effect.

or...

are you trying to add a string with a '

if so, sql server can't handle the '

you need to: REPLACE(string,"'","''")

and make ' into ''

For instance, inserting the string: Donut's
will fail.  But
inserting the string: Donut''s
will be fine.

Also, if that is not the problem...
try turning quoted_identifier ON, which allows query analyzer / stored procs to have '" + + "' (code like string concatenation)...

lemme know if this helps,, and try being more descriptive, like: what is the string you are inserting, to what data type of column in the database.. that sort of stuff..

:)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nickahCommented:
Hello BoostDriven,
   My first guess would be that the column you're inserting to is a char field.  In which case, you'll have to trim or truncate the data to fit in column.
    If that doesn't solutions don't solve the problem, please explain the context of this error message.  What is the datatype for the column you are inserting into?
   Also, how are you trying to upload data?  With individual insert statements?  From an Access query or table?  Using a data transformation service(DTS)?
   The best of luck to you.


Nick
0
CleanupPingCommented:
Boostdriven:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
arbertCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.  

I will leave the following recommendation for this question in the Cleanup topic area:

Accept Answer From tolstoyleo

Any objections should be posted here in the
next 4 days. After that time, the question will be closed.

Arbert
EE Cleanup Volunteer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.