Home » Developer & Programmer » Precompilers, OCI & OCCI » proc - how to close a connection
proc - how to close a connection [message #273179] Tue, 09 October 2007 06:30 Go to next message
davewood
Messages: 2
Registered: October 2007
Junior Member
Hello

I am writing a C-program using the proc precompiler

I can use

EXEC SQL CONNECT :connstr;


to open a connection to the database

but how can I close such a connection?

thanks in advance

david
Re: proc - how to close a connection [message #273182 is a reply to message #273179] Tue, 09 October 2007 06:55 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
exec sql commit/rollback work release;


Regards
Michel

[Updated on: Tue, 09 October 2007 06:56]

Report message to a moderator

Re: proc - how to close a connection [message #273187 is a reply to message #273182] Tue, 09 October 2007 07:09 Go to previous message
davewood
Messages: 2
Registered: October 2007
Junior Member
that was fast. Smile

thank you very much.

Some further info I found in the meantime which other users might appreciate:

Quote:

The optional keyword WORK provides ANSI compatibility. The RELEASE option frees all Oracle resources (locks and cursors) held by your program and logs off the database.

http://oraclelon1.oracle.com/docs/cd/B14117_01/appdev.101/a42525/ch07.htm
Previous Topic: Unicode Support - CreateEnvironment
Next Topic: code for inserting into a table
Goto Forum:
  


Current Time: Fri Mar 29 10:48:40 CDT 2024