.NET Component
It References SQLDMO
using System;
using System.Collections.Generic;
using System.Text;
using SQLDMO;
namespace MyNameSpace
{
public class MyClass
{
protected SQLDMO.SQLServerClass MyServer;
protected SQLDMO._Database MyDatabase;
String MyConnectString;
public MyClass()
{
MyServer = new SQLServerClass();
}
}
}
Calling Component:
// MyAName has been set such that it identifes the correct
// assembly
MyAssembly = Assembly.Load(MyAName);
myType = MyAssembly.GetType( "MyNameSpace.MyClass" );
myConstruct = myType.GetConstructor(Type.EmptyTypes);
myConstruct.Invoke(Type.EmptyTypes);
The EXE component, just calls the method in the calling component.
I get the Could not load file or assembly 'Interop.SQLDMO' error when I attempt the constructor invoke [ MyClass() ].
However the debugger will not step into the constructor code.
If the EXE component references the SQLDMO object, then everything works fine.
This all seemed to work fine on my 32bit WIN7 machine and VS2008.
Brent Rogers I.S.P.