• Register
0 votes
612 views

Problem :

I am updating values using JDBC but getting bellow error
java.sql.sqlexception: column count doesn't match value count at row 1
6.9k points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

Probably you are making a mistake with your quotes.

The proper Syntax as bellow:

INSERT INTO tablename(field1,field2) VALUES ('Text1,Text2'); 

So you need to write:

String Query_String = "INSERT INTO tablename(field1,field2) 
VALUES ('"+Text1+"','"+Text2+"')"

Further Readings:

38.6k points

Related questions

0 votes
0 answers 9 views
9 views
Problem: Hi I am facing this iisue can some one help me? column count doesn't match value count at row 1
asked Mar 20 PkGuy 25.9k points
1 vote
4 answers 26 views
26 views
Problem: Hi! Can some one help to solve this problem column count doesn't match value count at row 1 php
asked Mar 20 PkGuy 25.9k points
0 votes
1 answer 41 views
41 views
Problem: Column count doesn't match value count at row 1 java
asked Jun 27 Hridoy 19.2k points
0 votes
0 answers 6 views
6 views
Problem: Hi can some one help me outwith this issue? column count doesn't match value count
asked Mar 20 PkGuy 25.9k points
1 vote
1 answer 56 views
56 views
Problem: I’m trying to add a new row in an existing table but i keep getting this error : ERROR 1136 (21S01): Column count doesn't match value count at row 1 Here are the commads I’ve tried using : nsert into table (Field, Type, Null, Key, Default, Extra) VALUES (" ... ", "date", "YES", "", "NULL", ""); insert into table VALUES ('contract_expiration','date','YES','','NULL','');
asked Apr 30 Raj Tyagi 16k points
0 votes
1 answer 57 views
57 views
Problem: PLease help me with my query.It gives me the error, "Column count doesn't match value count at row 1." So I'm lost on the concept of how the column and row apply here.?
asked Apr 10 Sana8989 8.9k points
0 votes
1 answer 139 views
139 views
Problem: Hi, I am new to php database operations. i have written the query and it shows the error column count doesn't match value count at row 1 mysql. INSERT INTO Student VALUES ('Name', 'last name''class');
asked Nov 16, 2020 prog_learner 2.5k points
0 votes
1 answer 25 views
25 views
Problem: This has bothered me for quite some time, solution needed : Column count doesn't match value count at row.
asked May 27 Rada Gracelynn 104k points
0 votes
1 answer 14 views
14 views
Problem: >HELP! I need help understanding this problem? column count doesn't match value count at row
asked Apr 10 Rohit kr 17.5k points
0 votes
1 answer 14 views
14 views
Problem: I need help in resolving this problem: Cells(rows.count, 1).end(xlup).row?
asked Apr 5 tuhin1 48.9k points