try
{
DataSet ds=new DataSet ();
Type objType;
object objBinding;
objType = Type.GetTypeFromProgID("CSGPDBAccess.CSGPDBAccess");
objBinding = Activator.CreateInstance(objType);
Type[] paramTypes = new Type[] {Type.GetType("System.String"), Type.GetType("System.Int32"), Type.GetType("System.String[]&")};
MethodInfo m = objType.GetMethod("openProcedure",paramTypes);
object[] args = new object[3];
args[0] = "Test";
args[1] = 1;
args[2] = new string[]{"0052005"};
ds=(DataSet)m.Invoke(objBinding,args);
if(ds.Tables.Count>0 )
{
dataGrid1.DataSource=ds.Tables[0].DefaultView ;
}
}
catch(TargetInvocationException ee)
{
MessageBox.Show(ee.Message);
}