• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why insertion can not be performed in JDBC ?  RSS feed

 
vinoth vino
Ranch Hand
Posts: 67
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helo programmers, I m new to JDBC concepts and now i came to understand a little bit of JDBC such as connecting sql with java(jdbc) , creating table using jdbc application... This is what i learned now I m facing difficulty with insertion of values in database. I've created database "emp4" it consists of 3 columns(id,gmail,yahoo) Now i m trying to insert a set of values to emp4 but i didn't get any exception..... It just showing only the sysout in the console. Help me !!!



OUTPUT
INSERT INTO EMP4 (id, gmail ,yahoo) VALUES(1,'vinothvino','vinothvinoooo')
error.png
[Thumbnail for error.png]
 
Henry Wong
author
Sheriff
Posts: 23292
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vinoth vino wrote:Now i m trying to insert a set of values to emp4 but i didn't get any exception..... It just showing only the sysout in the console. Help me !!!


Actually, I think you did get an exception. There is one "catch" statement in your code, that doesn't print anything -- and it is likely, it is not showing anything because that is the code path that is taken.

Henry
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!