473,692 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

java.sql.SQLExc eption: Data truncated for column at row 1

21 New Member
Hi all,

When I update a table by sql qry, I am getting a error like "java.sql.SQLEx ception: Data truncated for column [column_name] at row 1" . I use mysql 4.1 for my application.
this particular column is in varchar with length 10.

Can anyone help regarding this??
Sep 24 '08 #1
4 28111
JosAH
11,448 Recognized Expert MVP
Most likely you attempted to store a String with more than ten characters in
that column.

kind regards,

Jos
Sep 24 '08 #2
bsonline
21 New Member
Most likely you attempted to store a String with more than ten characters in
that column.

kind regards,

Jos

But the data is exactly of 9 character and its constant.
Sep 25 '08 #3
JosAH
11,448 Recognized Expert MVP
But the data is exactly of 9 character and its constant.
I don't use mysql myself but I suspect that a char in a varchar is an eight bit
quantity and Java's char is a 16 bit quantity; some encoding is happening
(most likely). Try to change your table column to varchar 20 or so and see
what happens.

kind regards,

Jos
Sep 25 '08 #4
sonikaa
1 New Member
Java is one of the most generally used programming languages, and it is utilized as the server-side language for a vast of back-end development projects, including big data and Android development. Java is also commonly used in desktop and mobile computing, games, and numerical calculation. Java is an object-oriented programming language with a high level of abstraction and as few implementation dependencies as possible. Java classes in Pune
Mar 30 '22 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
7308
by: uthuras | last post by:
Machine : AIX 5.2 Product : UDB DB2 Release 8.1 FP4a I have problem loading data into destination table. The data file is huge with more than 6 Million records. This what i have done 1. Export the data into flat file (del format) 2. use the load command to load the data At step 2, i found that there are some errors registered in the load
2
6955
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of attending interviews. If you own a company best way to judge if the candidate is worth of it. http://www.questpond.com/InterviewRatingSheet.zip
0
14417
by: Grip | last post by:
Hi, I have gone throught the group and Microsoft's online help and have seen many suggestions but I am still seeking clarity: 1. I have an excel spreadsheet. Column A contains text that may be greater than 255 characters. 2. I have an access database. I link (not import) to the contents of the excel spreadsheet. In the design view in access, Column A has the data type "memo".
4
3024
by: eviewcs | last post by:
Hello I am a newbie in DB2. I am trying out the Mapping Java definitions to SQL on UDT from the article "DB2's object-relational highlights: Store and invoke structured type objects" by Kathryn Zeidenstein. The url is : http://www-128.ibm.com/developerworks/db2/library/techarticle/ zeidenstein/0109zeidenstein.html#xforms In the article , it is said that the use of Java classes to define SQL
21
3478
madhoriya22
by: madhoriya22 | last post by:
Hi, Here is the query which I am using to get the values from the database:- "SELECT ?, COUNT(*) AS COUNT " + "FROM DEFECT_DETAIL " + "WHERE TARGET_MILESTONE = ? " + "GROUP BY ?"; and here is function throught which I am getting data:-
1
3757
by: banging | last post by:
Hi there, I have a question regarding locking of tables so that when two or more people try to write or update the mysql tables, it locks up. Basically I only want one person to write to the file, but many are able to read the files (or tables entities). I am not sure if I need to lock the tables in my Java code or do I lock the tables within the MySQL syntax. I'm just a little confused on the matter. This java code is a working...
2
4045
by: meenuchotijuhi | last post by:
Hi, I've Recently joined this community coz i m very much interested in Oracle DBA track. Actaully I' m currently working on a project where I m using Java (jdk1.4) as front end and Oracle 9i as back end. When i connect my java gui application with Oracle db, it displays successful connection but when i try to enter some values through this application to the oracle database table then it display the following error - ...
0
9090
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8968
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7633
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5822
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4327
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4562
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2978
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2242
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1961
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.