Main Content

康尼t

Make database changes permanent

Syntax

康尼t(conn)

Description

康尼t(conn)makes permanent changes made to the database connection康涅狄格州since the last康尼torrollbackfunction was run. To run this function, theAutoCommitflag for康涅狄格州must beoff.

Examples

Example 1 — Check the Status of the Autocommit Flag

Check that the status of theAutoCommitflag for connection康涅狄格州isoff.

康涅狄格州.AutoCommit ans = 'off'

Example 2 — Commit Data to a Database

  1. Insertexdatainto the columnsDEPTNO,DNAME, andLOCin the tableDEPT, for the data source康涅狄格州.

    datainsert(conn,'DEPT',... {'DEPTNO';'DNAME';'LOC'},exdata)
  2. Commit this data.

    康尼t(conn)

Tips

For ODBC connections, you can use the康尼tfunction with the native ODBC interface. For details, seedatabase.

Version History

Introduced before R2006a