• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

2 The ODBC layer
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog ODBC Interface
        • The ODBC layer
          • Global configuration
          • Connection management
          • Running SQL queries
          • Transaction management
            • odbc_end_transaction/2
          • Accessing the database dictionary
          • Getting more information
          • Representing SQL data in Prolog
          • Errors and warnings
          • ODBC implementations
          • Remaining issues

2.4 Transaction management

ODBC can run in two modi. By default, all update actions are immediately committed on the server. Using odbc_set_connection/2 this behaviour can be switched off, after which each SQL statement that can be inside a transaction implicitly starts a new transaction. This transaction can be ended using odbc_end_transaction/2.

odbc_end_transaction(+Connection, +Action)
End the currently open transaction if there is one. Using Action commit pending updates are made permanent, using rollback they are discarded.

The ODBC documentation has many comments on transaction management and its interaction with database cursors.

ClioPatria (version V3.1.1-51-ga0b30a5)