N
newsreader
I am curious if anybody has tried to create a Catalogue Class in C#.
Here is the code:
CIODMLib.AdminIndexServerClass oAdmin = new
CIODMLib.AdminIndexServerClass();
CIODMLib.CatAdmClass oCatAdmin;
oAdmin.MachineName = "MYSERVER";
if(oAdmin.IsRunning())
{
oCatAdmin = (CIODMLib.CatAdmClass)oAdmin.GetCatalogByName("MYDF");
//Error here
}
else
{
oAdmin.Start();
}
For some reason the runtime error message tells me that the cast is not
valid.
The modified code does not work either, the same exception "cast is not
valid":
CIODMLib.AdminIndexServerClass oAdmin = new
CIODMLib.AdminIndexServerClass();
object oCatAdmin;
oAdmin.MachineName = "MYSERVER";
if(oAdmin.IsRunning())
{
oCatAdmin = oAdmin.GetCatalogByName("MYDF");
MessageBox.Show(((CIODMLib.CatAdmClass)oCatAdmin).GetCatalogByName("MYCATALO
GUE"); //Error here
}
else
{
oAdmin.Start();
}
Anybody has any ideas how to deal with this?
Here is the code:
CIODMLib.AdminIndexServerClass oAdmin = new
CIODMLib.AdminIndexServerClass();
CIODMLib.CatAdmClass oCatAdmin;
oAdmin.MachineName = "MYSERVER";
if(oAdmin.IsRunning())
{
oCatAdmin = (CIODMLib.CatAdmClass)oAdmin.GetCatalogByName("MYDF");
//Error here
}
else
{
oAdmin.Start();
}
For some reason the runtime error message tells me that the cast is not
valid.
The modified code does not work either, the same exception "cast is not
valid":
CIODMLib.AdminIndexServerClass oAdmin = new
CIODMLib.AdminIndexServerClass();
object oCatAdmin;
oAdmin.MachineName = "MYSERVER";
if(oAdmin.IsRunning())
{
oCatAdmin = oAdmin.GetCatalogByName("MYDF");
MessageBox.Show(((CIODMLib.CatAdmClass)oCatAdmin).GetCatalogByName("MYCATALO
GUE"); //Error here
}
else
{
oAdmin.Start();
}
Anybody has any ideas how to deal with this?