View Single Post
  #2 (permalink)  
Old 04-22-2008, 03:39 AM
rico16135 rico16135 is offline
Member
 
Join Date: Apr 2008
Posts: 28
rico16135 is on a distinguished road
first of all: JDBC is recommending that the DataSource interface should be used to create database connection objects instead of using the DriverManager class.

check here: Implementations of the DataSource Interface

Second put your code in code blocks, its too hard to read.
Third pstmt.setInt(1,emp_id); You seem to be telling it what column to insert to twice. 1 is the order, emp_id is the column name. Change that column name to what you actually want to enter into that field.
Reply With Quote