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.