sqlcommit() — Commit the Database Transaction

Commits the current database transaction. This function supports the EXEC SQL COMMIT WORK statement to commit any database transaction that is active since the most recent:

This function returns normalized values. For more information, see the function return values in the "General Diagnostics" section in this chapter:

SYNTAX
int
sqlcommit () 

NOTES

EXAMPLE

This example determines from a flag (dynpending) that there is uncommitted work prior to an attempt to exit the application through a switch statement. It queries the user and commits the work as directed:

  if (dynpending) /* There’s uncommitted work outstanding */
  {
      printf("You have uncommitted changes. Commit before exit? (Y/N)\n");
      gets(ans);
      if (*ans == ’y’ || *ans == ’Y’)
          /* EXEC SQL COMMIT WORK; */
          sqlcommit();
  }
            .
            .
            . 

SEE ALSO

sqlrollback() — Rollback Any Pending Transaction


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095