I have some code that works fine (using ctypes to call a dll), unless I run cx_Oracle first then I get an error:
WindowsError: [Error 126] The specified module could not be found
An example of the code is below:
query = '''select * from table'''
cx_Oracle.makedsn(host="host", port=1111, service_name='service.name')
db_conn = cx_Oracle.connect('/@somewhere')
cursor = db_conn.cursor()
lib_path = os.path.join("C:\\Program Files (x86)\\app", "data.dll")
self.externallib = ctypes.windll.LoadLibrary(lib_path)
I am using python 2.7.5
If I comment out the cx_Oracle code it works fine OR if I run it first.
Any thoughts appreciated,
Are you using Instant Client? What version of IC or the Oracle client libraries are you using?
Does data.dll have other dependencies?
Is there a symbol clash between Oracle libs and data.dll - does the same problem occur when loading another DLL?