CreateObject in Server Side Scripting 
Author Message
 CreateObject in Server Side Scripting

Jim,
    You should probably recompile your ActiveX Control as a .DLL.  .OCX's
are user interface objects, but you're trying to use it as a Business
Object.
    If you don't want to make it into a .DLL, you should instantiate it with
the OBJECT container tags.

--
Sanders Kaufman, Jr. [MCP]

http://www.*-*-*.com/

Quote:
> This is a better example.  I have registered saleslog.ocx on my web
server.
> It has a control named "SalesLogControl" in the OCX.  When I run the code
> shown below I get: Server.CreateObject Failed.

> Can someone point me in the right direction?

> Thanks for the help in advance!

> <BODY>
> <%
> Dim objOperator
> Set objOperator = Server.CreateObject("SalesLogControl")
> 'Response.Write "The phone number you require is " &
> objOperator.GetNumberFor("Uncle Brian", "Chicago")
> %>
> </BODY>
> </HTML>



Sun, 23 Feb 2003 07:20:50 GMT  
 CreateObject in Server Side Scripting
I think ocx controls those have an User Interface may be created as ActiveX
Documents. So that they can be called from web pages

--
Regards & Thanks From
PrakashDharan
Software Engineer
Euetch {*filter*}netics Pte. Ltd.,
Blk 55,Ayer Rajah Crescent
#04-01/07 Singapore 139949



Quote:
> Jim,
>     You should probably recompile your ActiveX Control as a .DLL.  .OCX's
> are user interface objects, but you're trying to use it as a Business
> Object.
>     If you don't want to make it into a .DLL, you should instantiate it
with
> the OBJECT container tags.

> --
> Sanders Kaufman, Jr. [MCP]

> http://www.*-*-*.com/


> > This is a better example.  I have registered saleslog.ocx on my web
> server.
> > It has a control named "SalesLogControl" in the OCX.  When I run the
code
> > shown below I get: Server.CreateObject Failed.

> > Can someone point me in the right direction?

> > Thanks for the help in advance!

> > <BODY>
> > <%
> > Dim objOperator
> > Set objOperator = Server.CreateObject("SalesLogControl")
> > 'Response.Write "The phone number you require is " &
> > objOperator.GetNumberFor("Uncle Brian", "Chicago")
> > %>
> > </BODY>
> > </HTML>



Tue, 25 Feb 2003 10:15:27 GMT  
 CreateObject in Server Side Scripting

An OCX doesn't necessarily need to be a visible UI control.  For example,
the Windows Script Host object model is implemented in wshom.ocx.  In fact,
you can create UserControls in VB that are not visible at runtime and do not
need a container window to be sited in --- for all intents an purposes, they
are exactly like a VB ActiveX DLL project.  You can even use the free VB5CCE
to do this.  In the end, OCX is just another extension for a DLL.

--
Michael Harris
Microsoft.MVP.Scripting
--



Quote:
> Jim,
>     You should probably recompile your ActiveX Control as a .DLL.  .OCX's
> are user interface objects, but you're trying to use it as a Business
> Object.
>     If you don't want to make it into a .DLL, you should instantiate it
with
> the OBJECT container tags.

> --
> Sanders Kaufman, Jr. [MCP]

> http://www.kaufman.net


> > This is a better example.  I have registered saleslog.ocx on my web
> server.
> > It has a control named "SalesLogControl" in the OCX.  When I run the
code
> > shown below I get: Server.CreateObject Failed.

> > Can someone point me in the right direction?

> > Thanks for the help in advance!

> > <BODY>
> > <%
> > Dim objOperator
> > Set objOperator = Server.CreateObject("SalesLogControl")
> > 'Response.Write "The phone number you require is " &
> > objOperator.GetNumberFor("Uncle Brian", "Chicago")
> > %>
> > </BODY>
> > </HTML>



Tue, 25 Feb 2003 11:17:07 GMT  
 CreateObject in Server Side Scripting
Your progid (SalesLogControl) is invalid.   AFAIK a ProgID always has
two parts seperated by a period.  FInd out what the name of the
project for your ocx is and use the following

  server.createobject("projectname.SalesLogControl")

On Mon, 4 Sep 2000 16:51:02 -0400, "Jim Mitchell"

Quote:

>This is a better example.  I have registered saleslog.ocx on my web server.
>It has a control named "SalesLogControl" in the OCX.  When I run the code
>shown below I get: Server.CreateObject Failed.

>Can someone point me in the right direction?

>Thanks for the help in advance!

><BODY>
><%
>Dim objOperator
>Set objOperator = Server.CreateObject("SalesLogControl")
>'Response.Write "The phone number you require is " &
>objOperator.GetNumberFor("Uncle Brian", "Chicago")
>%>
></BODY>
></HTML>



Thu, 27 Feb 2003 13:02:21 GMT  
 CreateObject in Server Side Scripting

Hi ,

Thank you very much for your clarification.

How can we have ActiveX controls those have an Visual Interface in the Web
pages.?

--
Regards & Thanks From
PrakashDharan
Software Engineer
Euetch {*filter*}netics Pte. Ltd.,
Blk 55,Ayer Rajah Crescent
#04-01/07 Singapore 139949


Quote:
> An OCX doesn't necessarily need to be a visible UI control.  For example,
> the Windows Script Host object model is implemented in wshom.ocx.  In
fact,
> you can create UserControls in VB that are not visible at runtime and do
not
> need a container window to be sited in --- for all intents an purposes,
they
> are exactly like a VB ActiveX DLL project.  You can even use the free
VB5CCE
> to do this.  In the end, OCX is just another extension for a DLL.

> --
> Michael Harris
> Microsoft.MVP.Scripting
> --



> > Jim,
> >     You should probably recompile your ActiveX Control as a .DLL.
.OCX's
> > are user interface objects, but you're trying to use it as a Business
> > Object.
> >     If you don't want to make it into a .DLL, you should instantiate it
> with
> > the OBJECT container tags.

> > --
> > Sanders Kaufman, Jr. [MCP]

> > http://www.*-*-*.com/


> > > This is a better example.  I have registered saleslog.ocx on my web
> > server.
> > > It has a control named "SalesLogControl" in the OCX.  When I run the
> code
> > > shown below I get: Server.CreateObject Failed.

> > > Can someone point me in the right direction?

> > > Thanks for the help in advance!

> > > <BODY>
> > > <%
> > > Dim objOperator
> > > Set objOperator = Server.CreateObject("SalesLogControl")
> > > 'Response.Write "The phone number you require is " &
> > > objOperator.GetNumberFor("Uncle Brian", "Chicago")
> > > %>
> > > </BODY>
> > > </HTML>



Thu, 27 Feb 2003 13:47:57 GMT  
 CreateObject in Server Side Scripting
You can use visible ActiveX controls as <OBJECT> elements in the client side
page (IE only), but not from the server side.

--
Michael Harris
Microsoft.MVP.Scripting
--


Quote:
> Hi ,

> Thank you very much for your clarification.

> How can we have ActiveX controls those have an Visual Interface in the Web
> pages.?

> --
> Regards & Thanks From
> PrakashDharan
> Software Engineer
> Euetch {*filter*}netics Pte. Ltd.,
> Blk 55,Ayer Rajah Crescent
> #04-01/07 Singapore 139949




Thu, 27 Feb 2003 14:24:50 GMT  
 CreateObject in Server Side Scripting
So, what's the point of a non-visual (not hidden) .OCX control?

--
Sanders Kaufman, Jr. [MCP]

http://www.kaufman.net

Quote:
> An OCX doesn't necessarily need to be a visible UI control.  For example,
> the Windows Script Host object model is implemented in wshom.ocx.  In
fact,
> you can create UserControls in VB that are not visible at runtime and do
not
> need a container window to be sited in --- for all intents an purposes,
they
> are exactly like a VB ActiveX DLL project.  You can even use the free
VB5CCE
> to do this.  In the end, OCX is just another extension for a DLL.

> --
> Michael Harris
> Microsoft.MVP.Scripting
> --



> > Jim,
> >     You should probably recompile your ActiveX Control as a .DLL.
.OCX's
> > are user interface objects, but you're trying to use it as a Business
> > Object.
> >     If you don't want to make it into a .DLL, you should instantiate it
> with
> > the OBJECT container tags.

> > --
> > Sanders Kaufman, Jr. [MCP]

> > http://www.kaufman.net


> > > This is a better example.  I have registered saleslog.ocx on my web
> > server.
> > > It has a control named "SalesLogControl" in the OCX.  When I run the
> code
> > > shown below I get: Server.CreateObject Failed.

> > > Can someone point me in the right direction?

> > > Thanks for the help in advance!

> > > <BODY>
> > > <%
> > > Dim objOperator
> > > Set objOperator = Server.CreateObject("SalesLogControl")
> > > 'Response.Write "The phone number you require is " &
> > > objOperator.GetNumberFor("Uncle Brian", "Chicago")
> > > %>
> > > </BODY>
> > > </HTML>



Mon, 03 Mar 2003 03:00:00 GMT  
 CreateObject in Server Side Scripting

It can be easier to implement in an OCX if your consumers are new VB
programmers that only know how to slap controls on a form.  Tell them to
slap your control on the form, and away they go!  You can code your control
so that they do not have to worry about creating or releasing object
references, they can simply call the methods of your control.  You also can
provide a richer API that can be accessed like a DLL, giving the developer
the choice about how they implement your code.

Kirk Allen Evans



Quote:
> So, what's the point of a non-visual (not hidden) .OCX control?

> --
> Sanders Kaufman, Jr. [MCP]

> http://www.kaufman.net


> > An OCX doesn't necessarily need to be a visible UI control.  For
example,
> > the Windows Script Host object model is implemented in wshom.ocx.  In
> fact,
> > you can create UserControls in VB that are not visible at runtime and do
> not
> > need a container window to be sited in --- for all intents an purposes,
> they
> > are exactly like a VB ActiveX DLL project.  You can even use the free
> VB5CCE
> > to do this.  In the end, OCX is just another extension for a DLL.

> > --
> > Michael Harris
> > Microsoft.MVP.Scripting
> > --



> > > Jim,
> > >     You should probably recompile your ActiveX Control as a .DLL.
> .OCX's
> > > are user interface objects, but you're trying to use it as a Business
> > > Object.
> > >     If you don't want to make it into a .DLL, you should instantiate
it
> > with
> > > the OBJECT container tags.

> > > --
> > > Sanders Kaufman, Jr. [MCP]

> > > http://www.kaufman.net


> > > > This is a better example.  I have registered saleslog.ocx on my web
> > > server.
> > > > It has a control named "SalesLogControl" in the OCX.  When I run the
> > code
> > > > shown below I get: Server.CreateObject Failed.

> > > > Can someone point me in the right direction?

> > > > Thanks for the help in advance!

> > > > <BODY>
> > > > <%
> > > > Dim objOperator
> > > > Set objOperator = Server.CreateObject("SalesLogControl")
> > > > 'Response.Write "The phone number you require is " &
> > > > objOperator.GetNumberFor("Uncle Brian", "Chicago")
> > > > %>
> > > > </BODY>
> > > > </HTML>



Tue, 04 Mar 2003 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. CreateObject in Server Side Scripting

2. Exchange server side scripting - CreateObject() problem

3. Client side scripting / server side scripting

4. Accessing Data generated with client-side script from server-side script

5. Calling Server Side Script from Client Side Script

6. Call Server Side Script From Client Side Script

7. Client side scripting / server side scripting

8. ASP referring to server side variables in client side script

9. Client side and Server side script working together

10. Client Side + Server Side Scripts

11. Client Side and Server Side Scripts

12. Server Side writing Client Side scripts

 

 
Powered by phpBB® Forum Software