Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

privilege by row? 2

Status
Not open for further replies.

amortillaro

Programmer
Dec 1, 2003
25
US
Hi all:
I creted a table in oracle and added 1 record to it through SQLPlus Insert Into mytable (fld1, fld2) values (str1, str2).
From within MsAccess I created a link to myTable, and no records were return, then I added 2 record from access in the linked table and works ok. Still just this 2 records are shown in access.
In SqlPlus the sql SELECT * from mytable return 3 records.

Can anyone tell what is going on here? Has this any relation to privileges or someting?

Thanks in advance.. Aishel
 
Did you do a commit after the first insert? If not, then that row will only be visible to the inserting session.

Elbert, CO
1210 MST
 
And... how do I commit the insert ?
I have multiple inserts in a procedure, how and where should I commit the insertions, I mean, after each insert statement or just one at the end??

Thanks.. Aishel
 
To commit, issue the command
COMMIT;

When should you commit? As is often the case, the answer is "it depends". If you want to treat all of your INSERT statements as a unit, then you should commit after the last INSERT. That way, if you decide you want to undo the inserts, you can issue the command
ROLLBACK;
and they will be undone. On the other hand, if you want to treat them separately, you could commit after each insert.

Elbert, CO
1327 MST
 
Hi Aishel

MsAccess commit per insert.

And as Carp says - Oracle commit then YOU give the instruction. If you exit SQLplus without commit - Oracle automatically generates a ROLLBACK. If you make a DLL command (create table, drop table, and so on) then Oracle makes a commit BEFORE and AFTER the statement.


Regards
Allan
Icq: 346225948
 
Actually, if you exit an Oracle session gracefully, Oracle does a commit. On the other hand, if you do an abnormal termination (power failure, ALT_CTL_DEL, etc), Oracle will issue an automatic ROLLBACK.

Elbert, CO
1351 MST
 
Thank all you for help me with this. I greatly appreciate it.
Now everything is working great, but a lot slowly than I predicted, but that's other thread theme.
Sincerely.. Aishel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top