[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

TsocketConnection or TClientSocket  ??

Posted on 2001-07-11
1
Medium Priority
?
711 Views
Last Modified: 2010-04-06
Hello,
I've developped an client/server application where the serverapp connects to a MS-SQL database. The connection is made by the TSocketConnection (Midas Tab) and using the ScktSrvr.exe.
I want to intercept the error messages like 'error reading from socket'. I understand in the TClientSocket (Internet Tab) you can write your own onerror event and catch the exceptions. So what's the real difference between those two components? Can I use the Client- and ServerSockets to connect to my database? If not how can I catch my errormessages?

Thanks,
Pascal
0
Comment
Question by:corpa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
bnemmers earned 300 total points
ID: 6273454
You will need to create a new class based on TSocketConnection

  TMySocketConnection = class(TSocketConnection)
  protected
    procedure DoError(E: Exception); override;
  end;

then override the DoError

procedure TMySocketConnection.DoError(E: Exception);
begin
  //handle error here.
  // you could call the inherited method when you
  // finish you code which just calls raise E;
end;

Bill.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question