?
Solved

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

Posted on 2003-02-19
5
Medium Priority
?
1,020 Views
Last Modified: 2006-11-17
What does " string data, Length mismatch" mean I keep getting it when I am trying to upload product to my database.

Thanks
Dane
0
Comment
Question by:Boostdriven
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Accepted Solution

by:
tolstoyleo earned 200 total points
ID: 7984513
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
 

Expert Comment

by:nickah
ID: 8033871
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
 

Expert Comment

by:CleanupPing
ID: 9276548
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
 
LVL 34

Expert Comment

by:arbert
ID: 10910484
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question