康尼t
Make database changes permanent
Syntax
康尼t(conn)
Description
康尼t(conn)
makes permanent changes made to the database connection康涅狄格州
since the last康尼t
orrollback
function was run. To run this function, theAutoCommit
flag for康涅狄格州
must beoff
.
Examples
Example 1 — Check the Status of the Autocommit Flag
Check that the status of theAutoCommit
flag for connection康涅狄格州
isoff
.
康涅狄格州.AutoCommit ans = 'off'
Example 2 — Commit Data to a Database
Insert
exdata
into the columnsDEPTNO
,DNAME
, andLOC
in the tableDEPT
, for the data source康涅狄格州
.datainsert(conn,'DEPT',... {'DEPTNO';'DNAME';'LOC'},exdata)
Commit this data.
康尼t(conn)
Tips
For ODBC connections, you can use the康尼t
function with the native ODBC interface. For details, seedatabase
.