tags:

views:

155

answers:

2

I was just wondering if anybody knows how to add reference to "Ritmo for iSeries" in IronPython. I did it successfully in C# and get it to work (since it is just click click click) And I was trying to do the same in IronPython but it says, "could not add reference to assembly Ritmo for iSeries".

I was doing

import clr clr.AddReference('Ritmo for iSeries') from Ritmo........

IOError: Could not add reference to assembly Ritmo for iSeries

A: 

You need to use the actual name of the assembly (it won't have spaces).

In your C# project, what does it list under the 'references' folder once you've added it as a reference? Try putting that. Also, make sure you've copied the dll for the library to where your IronPython script can find it (if it's not in the GAC).

Jonathan
Thanks...I copied the dll file to the location where Iron python can find it.
sagar
A: 

Jonathan helped me to figure out that I had not copied the dll file to the location where IronPython can find it.

After copying the dll file to the location, usually it s "c:\Program Files\IronPython 2.0\" unless stated otherwise, I did:

import clr

clr.AddReference('System.Data')

clr.AddReferenceToFile('Sql400.dll')

from System.Data import Sql400

from System.Data.Sql400 import *

sagar