As described in our online documentation, Stonefield Query includes a lightweight COM object called SQProxy. This allows other applications to run reports, get the names of folders and the reports in them, and so on. Even though SQProxy is a COM object, it can be used in .Net applications such as ASP.Net.
You can easily add a reference to the SQProxy Type Library to a .Net project and use the interop class Visual Studio creates for you in your application. Simply right-click references in the Solution Explorer, choose Add Reference, select the COM page, and choose the SQProxy Type Library.
However, there's a complication: object members of SQProxy, such as SQApplication, aren't included in the type library so they don't have the proper type information that .Net needs. As a result, these members are cast as Object and you therefore cannot access their properties or call their methods.
To get around this, use reflection. This demo class has two helper methods, GetProperty and CallMethod, that get the value of a property or call the method of a Stonefield Query object. Thanks to C# MVP Rick Strahl for providing this technique and code.
//Get references to some objects.
//Find out how many folders there are.
//object to read the value of a property.