pcm_connect() - cassiobj/PCM-Python_lib GitHub Wiki

Table of Contents

pcm_connect Function

The pcm_connect function is part of a Python extension for Oracle BRM. It is responsible for establishing a connection to the Context Manager.

Description

The pcm_connect function connects to the Context Manager of Oracle BRM.

Parameters

  • database (optional): Number (long number) of CM database do connect.

Return Value

The function returns a boolean value:

  • True: If the connection to the Context Manager is successful.
  • False: If the connection to the Context Manager fails.
In case of an error, the `error` exception is raised.

Usage

You can use the pcm_connect function in your Python scripts to establish a connection to the Context Manager of Oracle BRM. Here is an example code:

import PCMPy

try:
    if PCMPy.pcm_connect():
        print("Connection to the Context Manager established successfully!")
    else:
        print("Failed to establish connection to the Context Manager.")
except PCMPy.error as e:
    print("An error occurred:", str(e))

or

import PCMPy

try:
    if PCMPy.pcm_connect(393217):
        print("Connection to the Context Manager established successfully!")
    else:
        print("Failed to establish connection to the Context Manager.")
except PCMPy.error as e:
    print("An error occurred:", str(e))
⚠️ **GitHub.com Fallback** ⚠️