Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Error Handling


Reply
 
Thread Tools Display Modes
  #1  
Old 10-25-2002, 09:03 AM
ChetShah ChetShah is offline
Freshman
 
Join Date: Jan 2002
Posts: 34
Default Error Handling


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
Reply With Quote
  #2  
Old 10-25-2002, 10:05 AM
Optikal's Avatar
Optikal Optikal is offline
Codeaholic

Retired Leader
* Guru *
 
Join Date: Oct 2002
Location: Winnipeg, MB, Canada
Posts: 4,543
Default

What line of code is causing this error?
__________________
There are 10 types of people in this world, those that understand binary, and those that don't.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->