Events with an MTS COM object.
-
I have an MTS COM component that is used for updating a SQLServer database. The component sits on the SQLServer computer, whereas the client of the component sits on various user machines (the typical 3 tier setup). I have written 3 events in the component. In the client app, all works fine until I add 'WithEvents' to the variable declaration for the object. When I run the client application, I get a 'Permission Denied' error. What's up? The SQLServer PC is running Windows 2000 Advanced Server, and the client app and COM component were compiled with VB6, SR4. Dim U As tldll.Update 'This works fine, but... Dim WithEvents U As tldll.Update 'fails with the Permission Denied error Thanks in advance for any ideas. Jamie Nordmeyer Portland, Oregon, USA
-
I have an MTS COM component that is used for updating a SQLServer database. The component sits on the SQLServer computer, whereas the client of the component sits on various user machines (the typical 3 tier setup). I have written 3 events in the component. In the client app, all works fine until I add 'WithEvents' to the variable declaration for the object. When I run the client application, I get a 'Permission Denied' error. What's up? The SQLServer PC is running Windows 2000 Advanced Server, and the client app and COM component were compiled with VB6, SR4. Dim U As tldll.Update 'This works fine, but... Dim WithEvents U As tldll.Update 'fails with the Permission Denied error Thanks in advance for any ideas. Jamie Nordmeyer Portland, Oregon, USA
I don't know what the problem might be, but one thing I can tell you is that your design is simply disastrous for n-tier applications. "WithEvents" is just not meant to be used that way. Look at the COM+ event system or redesign your app using interface callbacks or something like that. ___________ Klaus [www.vbbox.com]