views:

120

answers:

3

Hey I am coding using Visual Studio 2003. My program worked fine until I introduced a dll I made using CreateObject. Code:

Set docs2 = server.CreateObject("DocGetter.Form1")
docs2.GetDocument oXMLDom,numID

It appears to be getting stuck at this code. I've already used regasm to register the dll. What else could be wrong?

A: 

Can you clarify - is this a web app or a client (winform) app? Form1 sounds like a winform. ASP.NET runs at the server, so showing a form would be inappropriate - it would happen at the server, not the client. In short, don't do this!

I also can't see where "stored procedures" figures in this, so I've removed the tag.

What are you trying to do? Options for showing something more complex at the client include:

  • dhtml
  • flash
  • silverlight
  • clickonce [requires windows client]
  • ocx [not recommended]
Marc Gravell
aps.net uses the form paradigm
Joel Coehoorn
@Joel - indeed, but without more context from the OP it is unclear whether this Form1 is a webform or a winform.
Marc Gravell
+1  A: 

Add a reference to the dll in your project and instantiate the object like this:

Dim docs2 As New DocGetter.Form1()

If that doesn't make sense, then fix it so it does. There's no good reason to use CreateObject in .Net code. (Okay, that's hyperbole. But the principal is sound).

Joel Coehoorn
A: 

I'd bet money that this function isn't defined with this name and/or parameters.

docs2.GetDocument oXMLDom,numID

But because of the way you're instantiating the object, the compiler has no way of knowing this... I think.

PaulMorel