aspose file tools*
The moose likes JDBC and the fly likes Constraint on table that prohibits record inserts using web based app(JAVA) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Constraint on table that prohibits record inserts using web based app(JAVA)" Watch "Constraint on table that prohibits record inserts using web based app(JAVA)" New topic
Author

Constraint on table that prohibits record inserts using web based app(JAVA)

suresh pillai
Greenhorn

Joined: Oct 30, 2003
Posts: 23
Hi all,
Does any one know if there can be any constraints on the a table (in Oracle) that prohibits record inserts through web based tools, but does permit to delete the records.
My observation:- Iam using 'executeUpdate()' to perform inserts.When I check the returned int value, it is '1'.Which is correct as Iam inserting one record into the table. But when I check the table I do not find any values. It is empty. It is not throwing any sqlException.
But when I use 'executeUpdate()' to delete records it works fine.
thanks in advance,
suresh
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

if you were violating a constraint, a SQLException would be thrown. The problem probably has to do more with transaction management. Do you commit the insert after it has successfully been inserted?
Jamie
suresh pillai
Greenhorn

Joined: Oct 30, 2003
Posts: 23
I created a new table with same fields and tried inserting the records, it worked fine.
This is the reason Iam guessing that there must be some constraint on the table that is preventing inserts.
Any input is welcome...
[ December 08, 2003: Message edited by: suresh pillai ]
[ December 08, 2003: Message edited by: suresh pillai ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Constraint on table that prohibits record inserts using web based app(JAVA)
 
Similar Threads
record gets inserted twice
Insert new records in database without deleting existing records
SIGNAL PRBLEM......
a q about deleting record(s) using JDBC:ODBC and Microsoft Access
executeUpdate() not inserting record