0

After I installed Oracle database 11g, I went to Eclipse Database Development Perspective and successfully created a new database connection for Oracle.

enter image description here

Then I created a new account call "testing" and logged in with this new user "testing" through SQL Plus and created a new table.

Enter user-name: testing
Enter password:

SQL> CREATE TABLE TBLSAMPLE (NAME varchar(50), EMAIL varchar(50), AGE integer);
Table created.

When refresh the Schema in Eclipse's Data source explorer. The table added from SQL Plus shows up. (All is working well so far)

enter image description here

I proceeded to insert some records from SQL Plus with the same user ("testing"). A check on the table shows that the records were indeed inserted.

SQL> SELECT * from tblSample;
...
6 rows selected.

Now the problem is: The inserted records are not showing up in Eclipse's Data Source Explorer despite refreshing the schema & the tables folder.

I created a new SQL file and select the entire tblSample, and it shows 0 records as well. I then inserted 1 row of record from Eclipse SQL file. It does shows up in Eclipse, but it does not affect the 6 rows of records in Oracle SQL Plus.

Why are the inserted records not showing up in Eclipse? To troubleshoot the culprit, I created a NetBeans project using the same Oracle database and all 6 rows of records does show up in NetBeans.

So what could have gone wrong?

4
  • Modifications performed by a session are not visible to others until they are commited. Issue a commit after performing these changes. Commented Apr 17, 2018 at 8:47
  • @BalazsPapp Thank you for your reply. But if it is not committed, why is it displaying in NetBeans, but not in Eclipse? Commented Apr 17, 2018 at 8:48
  • @BalazsPapp I think you are right. I issued a commit statement and all records shows up now. You can post your solution below and I will accept it. Now I only wonder why NetBeans doesn't requires the commit to see the updated results yet Eclipse requires it. Commented Apr 17, 2018 at 8:56
  • Oracle does not allow you to read dirty data (*). Your testing with NetBeans must be faulty. (AFAIK - there are ways to read uncommited data but that requires some highly advanced DBMS packages that are designed to be used for 2-phased commits) Commented Apr 17, 2018 at 19:30

1 Answer 1

2

Modifications performed by a session are not visible to others until they are commited. Issue a commit after performing these changes.

1
  • Accept and up-voted for your swift response. Even if you don't place a solution here, I've decided to reward you in other ways ;) Commented Apr 17, 2018 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.