Error Handling

ChetShah
10-25-2002, 09:03 AM
I have a Client/Server environment setup for my Search Application.

The Server is One ActiveX DLL
Client - One Standard EXE File

For Testing Purposes i am creating some deliberate errors. For example - i have changed the DSN details to stop DB connection and raised an error within the Server DLL like shown below:

Private Sub Class_Initialize()
'Initialise event which initials a connection to CDS Database
On Error GoTo Initalise_Db
Set objConn = New ADODB.Connection

With objConn
.CursorLocation = adUseClient
.ConnectionString = "DSN=CDS;Database=FSARegister;UID=sa;PWD=;"
.Open
End With

Exit Sub
Initalise_Db:

Err.Raise vbObjectError + 1000, "CDS Search Class", "Cannot Connect to CDS Database - Make Sure ODBC has been setup properly"

End Sub



The problem is when i click the Search button on client this error is not shown and instead i have error 91 - Object variable not set on the client end - Any ideas on how to show this error??

Chet

Optikal
10-25-2002, 10:05 AM
What line of code is causing this error?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum