I'm trying to write a c# command line app that runs report dll's at set
times. The dll's are written in c# with a common interface so by passing the
object name from the command line I can create ao instance ot the object &
create the report.
In VB I used code like:
Set obj = CreateObject(ob jName)
Call obj.Init(databa seName, fromDate, toDate)
I've tried the c# code:
System.Type oType = System.Type.Get TypeFromProgID( "rptName.Init") ;
object obj = System.Activato r.CreateInstanc e(oType);
oType.InvokeMem ber("createRepo rt",
System.Reflecti on.BindingFlags .InvokeMethod, null,0, new object[]{})
obj.createRepor t(dbName,fromDa te,toDate);
but so far not been able to get it to work.
I'm sure I'm just missing something silly but at present can't see it, Maybe
because it's Friday!!!
Any help/advise would be welcome.
Thanks,
John
times. The dll's are written in c# with a common interface so by passing the
object name from the command line I can create ao instance ot the object &
create the report.
In VB I used code like:
Set obj = CreateObject(ob jName)
Call obj.Init(databa seName, fromDate, toDate)
I've tried the c# code:
System.Type oType = System.Type.Get TypeFromProgID( "rptName.Init") ;
object obj = System.Activato r.CreateInstanc e(oType);
oType.InvokeMem ber("createRepo rt",
System.Reflecti on.BindingFlags .InvokeMethod, null,0, new object[]{})
obj.createRepor t(dbName,fromDa te,toDate);
but so far not been able to get it to work.
I'm sure I'm just missing something silly but at present can't see it, Maybe
because it's Friday!!!
Any help/advise would be welcome.
Thanks,
John
Comment