Results 1 to 3 of 3
  1. #1
    danpotter is offline Member
    Join Date
    May 2011
    Posts
    43
    Rep Power
    0

    Default Oracle "ORA-01400" Error Help

    well,im getting this error...

    Java Code:
    not found java.sql.SQLException: ORA-01400: cannot insert NULL into ("DB"."FDD"."EMPNAME")
    i used prepared statement to insert the values like this

    Java Code:
    PreparedStatement st1=con.prepareStatement("insert into fdd values(?,?,?)");
    st1.setString(1,empname);
    st1.setString(2,pd);
    st1.setString(3,fd);
    My database Table
    Java Code:
    CREATE TABLE  fdd
       (	"EMPNAME" VARCHAR2(20) NOT NULL, 
    	"Pd" VARCHAR2(20) NOT NULL , 
    	"FD" VARCHAR2(3000) NOT NULL, 
    	 PRIMARY KEY ("Pd") ENABLE
       )
    NOTE:-

    EVen though im getting the error,..the insertion in database is SUCCESSFUL.....but why im getting that error?? even though i placed values "NOT NULL" ,why im getting NULL error??? How to remove this error??

    Please help me...

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default Re: Oracle "ORA-01400" Error Help

    Well, since you declared that those fields can't be null, they can't. What's confusing about that?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    danpotter is offline Member
    Join Date
    May 2011
    Posts
    43
    Rep Power
    0

    Default Re: Oracle "ORA-01400" Error Help

    LOL..,then why im recvng this error??

    not found java.sql.SQLException: ORA-01400: cannot insert NULL into ("DB"."FDD"."EMPNAME")

Similar Threads

  1. Replies: 0
    Last Post: 12-07-2012, 08:29 AM
  2. Replies: 1
    Last Post: 11-02-2012, 11:38 PM
  3. Replies: 3
    Last Post: 10-30-2012, 03:06 PM
  4. Replies: 1
    Last Post: 05-30-2012, 09:30 AM
  5. Replies: 1
    Last Post: 10-20-2008, 07:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •