
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.