Visual Basic Server Components in Visual Interdev 
Author Message
 Visual Basic Server Components in Visual Interdev

Hi,

I am attempting to create a set of ActiveX server components that will model
a database for a Visual Interdev project.  In Visual Basic the project is an
ActiveX DLL.  Is there anyway to use and debug the components without
compiling the project?  If I compile the project, I have to reboot my
computer every time I make a change and want to test because it claims the
DLL is in use.

I know that within VB, I can simply run the project and the proper registry
entries are made so that another VB session can use the components.
However, whenever I attempt to do the same in Visual Interdev, my computer
beeps when I try to access an ASP script that creates an instance of one of
my objects and nothing appears in my browser.

Has anybody every created, used, and debugged VB server components in this
way?

I am using Visual Basic 5.0 (SP3) and Visual Interdev 1.0 (SP3).

Thanks for you help.




Wed, 13 Sep 2000 03:00:00 GMT  
 Visual Basic Server Components in Visual Interdev

They work fine, with some caveats:

You cannot store references in your server-side DLL to any of the ASP
objects across ASP pages or you will crash the server.

Be sure to declare all parameter values as variants in your DLL, otherwise
you will have problems calling them from ASP pages, as all VBScript
variables are variants.

To recompile, you do not have to reboot your machine, just start and stop
your web server to free the reference so you can recompile.  Supposedly, you
will not have to do this with IIS 4.0.  I complained about it to Microsoft,
their representative claimed it was a "feature" in IIS 3.0, not a bug.

Quote:

>Hi,

>I am attempting to create a set of ActiveX server components that will
model
>a database for a Visual Interdev project.  In Visual Basic the project is
an
>ActiveX DLL.  Is there anyway to use and debug the components without
>compiling the project?  If I compile the project, I have to reboot my
>computer every time I make a change and want to test because it claims the
>DLL is in use.

>I know that within VB, I can simply run the project and the proper registry
>entries are made so that another VB session can use the components.
>However, whenever I attempt to do the same in Visual Interdev, my computer
>beeps when I try to access an ASP script that creates an instance of one of
>my objects and nothing appears in my browser.

>Has anybody every created, used, and debugged VB server components in this
>way?

>I am using Visual Basic 5.0 (SP3) and Visual Interdev 1.0 (SP3).

>Thanks for you help.





Thu, 14 Sep 2000 03:00:00 GMT  
 Visual Basic Server Components in Visual Interdev

Quote:
>You cannot store references in your server-side DLL to any of the ASP
>objects across ASP pages or you will crash the server.

Russell, can you be more specific? TIA...

--
Steven Ramirez



Fri, 15 Sep 2000 03:00:00 GMT  
 Visual Basic Server Components in Visual Interdev

Yes.  Specifically, it's useful to get a reference to at least the Response
object in the OnStartPage event.  This lets you write HTML-formatted
responses or error messages back to the browser directly from your DLL.
However, if you have untrapped errors, the ASP page will not call the
onEndPage event, leaving a reference to the ASP object(s) active within your
DLL.  In other words, you MUST release the reference(s) when the ASP page
completes its processing or you will have problems.


Quote:
>>You cannot store references in your server-side DLL to any of the ASP
>>objects across ASP pages or you will crash the server.

>Russell, can you be more specific? TIA...

>--
>Steven Ramirez



Sat, 16 Sep 2000 03:00:00 GMT  
 Visual Basic Server Components in Visual Interdev

You're right, you can cast the parameter values in VBScript code before
sending them to the server.  I used this method at first, but I don't
anymore, because I found that (a) it was both awkward to document and clumsy
for other programmers to learn and remember easily, and (b) if you move the
parameter type-checking and conversion to the DLL, you only have to write
the code once, plus it runs in compiled code.

Quote:

>Just a comment about declaring all your parameter values as variant, you do
>not have to do this.  I always properly type my parameters in the
component,
>and the use the VBScript conversion functions in my ASPs.  Such As:

>Set oApp = Server.CreateObject("MyServer.Application")

>If oApp.ValidateUser(CStr(Request("txtAccount")),
>CStr(Request("txtPassword"))) Then
>Else
>End If

>Set oApp = Nothing

>--

>Michael A. Drawbaugh
>Director, Information Systems
>Kairos Health Systems, Inc.


>>They work fine, with some caveats:

>>You cannot store references in your server-side DLL to any of the ASP
>>objects across ASP pages or you will crash the server.

>>Be sure to declare all parameter values as variants in your DLL, otherwise
>>you will have problems calling them from ASP pages, as all VBScript
>>variables are variants.

>>To recompile, you do not have to reboot your machine, just start and stop
>>your web server to free the reference so you can recompile.  Supposedly,
>you
>>will not have to do this with IIS 4.0.  I complained about it to
Microsoft,
>>their representative claimed it was a "feature" in IIS 3.0, not a bug.


>>>Hi,

>>>I am attempting to create a set of ActiveX server components that will
>>model
>>>a database for a Visual Interdev project.  In Visual Basic the project is
>>an
>>>ActiveX DLL.  Is there anyway to use and debug the components without
>>>compiling the project?  If I compile the project, I have to reboot my
>>>computer every time I make a change and want to test because it claims
the
>>>DLL is in use.

>>>I know that within VB, I can simply run the project and the proper
>registry
>>>entries are made so that another VB session can use the components.
>>>However, whenever I attempt to do the same in Visual Interdev, my
computer
>>>beeps when I try to access an ASP script that creates an instance of one
>of
>>>my objects and nothing appears in my browser.

>>>Has anybody every created, used, and debugged VB server components in
this
>>>way?

>>>I am using Visual Basic 5.0 (SP3) and Visual Interdev 1.0 (SP3).

>>>Thanks for you help.





Sat, 16 Sep 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Visual Basic Server Components in Visual Interdev

2. Visual Basic Server Components in Visual Interdev

3. Learning Basic - Visual Basic - Visual InterDev

4. Visual Basic vs. Visual Interdev

5. Visual Basic X Visual Interdev

6. Visual InterDev for the Visual Basic Developer

7. Visual InterDev for the Visual Basic Developer

8. Visual InterDev for the Visual Basic Developer

9. Visual InterDev for the Visual Basic Developer

10. Visual InterDev for the Visual Basic Developer

11. Visual InterDev for the Visual Basic Developer

12. Visual InterDev for the Visual Basic Developer

 

 
Powered by phpBB® Forum Software