pcm_connect() - cassiobj/PCM-Python_lib GitHub Wiki
The pcm_connect function is part of a Python extension for Oracle BRM. It is responsible for establishing a connection to the Context Manager.
The pcm_connect function connects to the Context Manager of Oracle BRM.
- database (optional): Number (long number) of CM database do connect.
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.
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))