Results 1 to 2 of 2

Thread: COM+ help please

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Location
    SE London
    Posts
    22

    COM+ help please

    Hi ppl

    I have a DLL called ChurSMS.dll which is communicating with my SQL Server database.

    I have developed this system and it all works fine on my machine but when i compiled and deployed it on my test machine im getting some problems.

    Right i have used install shield to deploy my EXE and all its dependencies and made sure all DLL's are registered correctly.
    I have created my COM+ application on my server and installed the proxy app onto my test machine.

    The programs starts ok but when i execute the code to create my class object it just crashes out. for example i created a test form with just the following code.

    Option Explicit

    Private clstest As ChurSMS.clsIndependentStaff

    Private Sub Form_Load()
    Set clstest = CreateObject("ChurSMS.clsIndependentStaff")
    End Sub

    When this code executes it crashes out saying 'OCSChurchillSMS has generated errors and will be closed by windows'

    ok so i changed the code to this

    Option Explicit

    Private Sub Form_Load()
    Private clstest As ChurSMS.clsIndependentStaff
    Set clstest = CreateObject("ChurSMS.clsIndependentStaff")
    End Sub

    and it executed fine??

    Also if the test machine is not connected to the network and cannot access the COM+ server it generates the same error?

    Please could someone tell me what i am doing wrong surely i do not have to declare the class objects inside every routine.

    I dont remember ever having this problem before so i slightly baffled.

    Any help appreciated.

  2. #2
    Banned
    Join Date
    Jul 2003
    Location
    New delhi
    Posts
    143
    hi dear

    you problem is very good one.i go through it.

    when you run this come in different machine and then you run it
    then you have to give the server name where the dll exit


    examle


    let the dll in the comp.and you run the exe in com2.and calling the dll from com1.so your com1 is server .then you give the srever name as com1.

    here is the code


    Option Explicit
    Private clstest As ChurSMS.clsIndependentStaff

    Private Sub Form_Load()
    Set clstest = CreateObject("ChurSMS.clsIndependentStaff","Com1")
    End Sub

    may be this sove your problem
    by biswajit das

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width