Home » Developer & Programmer » Precompilers, OCI & OCCI » COMMIT RELEASE; vs COMMIT;
COMMIT RELEASE; vs COMMIT; [message #272897] Mon, 08 October 2007 02:28 Go to next message
dhristov
Messages: 2
Registered: October 2007
Junior Member
I'm trying to understand when should I use COMMIT WORK RELEASE and when COMMIT. I've seen both statements in production code, but still cannot tell any difference.

the Pro*C/C++ Precompiler Programmer's Guide says that "The RELEASE option frees all Oracle resources (locks and cursors) held by your program and logs off the database."

Then I assume that the "COMMIT;" option does not relase the cursors and locks. Why would I need that? And if I use a simple "COMMIT;" statement isn't Oracle going to release the lock anyway?

Or am I wrong?



Re: COMMIT RELEASE; vs COMMIT; [message #272924 is a reply to message #272897] Mon, 08 October 2007 03:40 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
RELEASE logs off, otherwise you stay connected.
This is the only difference.
Locks are released in both cases.
Cursors depend on other options.

Regards
Michel

[Updated on: Mon, 08 October 2007 06:06]

Report message to a moderator

Re: COMMIT RELEASE; vs COMMIT; [message #272941 is a reply to message #272897] Mon, 08 October 2007 05:02 Go to previous message
dhristov
Messages: 2
Registered: October 2007
Junior Member
Thank you, now that makes sense to me.

Previous Topic: Passing VARCHAR2 arrays from ProC to PLSQL
Next Topic: Bind Variable, ORA-01008: not all variables bound
Goto Forum:
  


Current Time: Fri Apr 19 05:35:02 CDT 2024