
ObjectContext object error
I am attempting to instantiate the ObjectContext object within my VB6
component so that I can use the URLEncode method of the intrinsic ASP
Server object.
I have referenced the COM+ Services Type Library and the Microsoft
Active
Server Pages Object Library (Asp.dll). I'm on Win2K.
Still, when I attempt the following code, I get an "Object variable or
With block variable not set" error on the line where I Set objServer =
objContext("Server"):
Dim objContext As ObjectContext
Dim objServer As Server
Set objContext = GetObjectContext()
Set objServer = objContext("Server")
strHtmlBody = objServer.HTMLEncode(strHtmlBody)
Anybody know why?
--Chris