posted 19 years ago
Hi,
I am creating a db connection using the URL,UserId,Password.
java.util.Properties prop = new java.util.Properties();
prop.put("user", UserID);
prop.put("password", Password);
Connection connection = DriverManager.getConnection(conn_url, prop);
connection.setAutoCommit(false);
The problem that I am facing is that,
My connection has autoCommit set to false.
I execute a Stored proc which inserts a row in the table.
Furthur down I fire a select query which tries to read the row which has just been inserted.
But the select query returns me zero rows.
But if I give the database name similar to the user id and then add it inside my properties file then this select query fires and returns me a row which was inserted by the stored proc.
java.util.Properties prop = new java.util.Properties();
prop.put("user", UserID);
prop.put("DBName", DBName);
prop.put("password", Password);
Connection connection = DriverManager.getConnection(conn_url, prop);
connection.setAutoCommit(false);
Fail to understand why such a thing happens.
Is there any Oracle server setting that I need to look into?
Thanks,
Chinmay
The strength of the Wolf is the pack & the strength of the pack is the wolf....Rudyard Kipling