示例#1
0
func (conn *Connection) Rollback() (err *ODBCError) {
	ret := C.SQLEndTran(C.SQL_HANDLE_DBC, conn.Dbc, C.SQL_ROLLBACK)
	if !Success(ret) {
		err = FormatError(C.SQL_HANDLE_DBC, conn.Dbc)
	}
	return
}
示例#2
0
func (conn *Connection) Commit() (err *ODBCError) {
	ret := C.SQLEndTran(C.SQL_HANDLE_DBC, conn.Dbc, C.SQL_COMMIT)
	if !Success(ret) {
		err = FormatError(C.SQL_HANDLE_DBC, conn.Dbc)
	}
	return
}
示例#3
0
func SQLEndTran(handleType SQLSMALLINT, handle SQLHANDLE, completionType SQLSMALLINT) (ret SQLRETURN) {
	r := C.SQLEndTran(C.SQLSMALLINT(handleType), C.SQLHANDLE(handle), C.SQLSMALLINT(completionType))
	return SQLRETURN(r)
}