G
Guest
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(objName)
Call obj.Init(databaseName, fromDate, toDate)
I've tried the c# code:
System.Type oType = System.Type.GetTypeFromProgID("rptName.Init");
object obj = System.Activator.CreateInstance(oType);
oType.InvokeMember("createReport",
System.Reflection.BindingFlags.InvokeMethod, null,0, new object[]{})
obj.createReport(dbName,fromDate,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(objName)
Call obj.Init(databaseName, fromDate, toDate)
I've tried the c# code:
System.Type oType = System.Type.GetTypeFromProgID("rptName.Init");
object obj = System.Activator.CreateInstance(oType);
oType.InvokeMember("createReport",
System.Reflection.BindingFlags.InvokeMethod, null,0, new object[]{})
obj.createReport(dbName,fromDate,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