I'm trying to create a connection with Primavera Software development Kit on windows 10 64 bit using Python 2.7 32 bit (sadly Primavera's SDK is available only for 32 bit) and using comtypes module.
The effective part of my code is
#Needed Imports
import sys
import os
import comtypes.client
from comtypes.client import CreateObject
#Create the ADO Object, then connect to Primavera's Database,
#supplying the "ConnectionString" as an argument to the method "Open".
SDK = CreateObject('ADODB.Connection')
SDK.Open("DRIVER={Primavera Software Development Kit};DSN=PMSDK;UID=pubuser;PWD=pubuser")
And the error is at the line
SDK.Open("DRIVER={Primavera Software Development Kit};DSN=PMSDK;UID=pubuser;PWD=pubuser")
Though the SDK is configured with the 32-bit ODBC tool as shown in these images:
SDK added as a Data Source named PMSDK
Properties of PMSDK at ODBC Configuration
But whatever I do with the ConnectionString, I always face this error
COMError: (-2147467259, 'Unspecified error', (u'[ATI][OpenRDA ODBC]General error - Database keyword not present in the connect string', u'Microsoft OLE DB Provider for ODBC Drivers', None, 0, None))
What should be done so as to get python recognizing Primavera's Software Development Kit?!
EDIT
changing the ConnectionString to DRIVER={Primavera Software Development Kit};DSN=PMSDK;DATABASE=C:\Oracle\Primavera P6\PMSDK\Drivers;UID=pubuser;PWD=pubuser
or to DRIVER={Primavera Software Development Kit};SERVER=127.0.01;DSN=PMSDK;DATABASE=C:\Oracle\Primavera P6\PMSDK\Drivers;UID=pubuser;PWD=pubuser
results into this error
COMError: (-2147467259, 'Unspecified error', (u'[ATI][OpenRDA ODBC]RDA error: Resource unknown - Database Name:C:\\Oracle\\Primavera P6\\PMSDK\\Drivers is not valid on Server.', u'Microsoft OLE DB Provider for ODBC Drivers', None, 0, None))