i have a jsp form, from that i have insert my data to the database, and also the insert values shows on the other jsp file.
i have used jdbc for that.
My problem is that when i made the dulicate entry for the partocular on field value, it doesnot shows error on jsp file.
The error is shown in tomcat server, but not in any file.
i have also made that paticulay field not null.
my sql table is as follows:
Name Null? Type
----------------------------------------- -------- -------------
GL_CODE NOT NULL NUMBER(4)
GL_DESCR NOT NULL VARCHAR2(80)
DB_AMT NUMBER(15,2)
CR_AMT NUMBER(15,2)
GL_TYPE VARCHAR2(2)
GL_PCT NUMBER(4,2)
plz help me..
plz provide me query for that..
thanx
11-23-2004, 11:38 AM
sjalle
I've had the same problem myself.
Isn't it possible to enclose the db insert/update w. a try/catch for duplicate keys and formulate a reasonalble response back to the client when it occurs? If not, you could do a quick lookup prior to the insert/update and detect the duplicate there.