Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Session Connection Problem
Tue, Apr 3 2007 9:42 AMPermanent Link

Alfred Ghazzi
Hi

I do not know what I'm doing wrong but the following code is not working. It raises the following exception when [vSession.Connected := True] is
executed. The exception is 'Socket Error: An Existing connection was forcibly closed by the remote host (10054), on API 'recv'.

The firewall is off, I used different login names and passwords including the default ones. The same session info when I create it in the dbmanager it
works fine (the session connects) but in the code below it raises the above mentioned exception. The server is running on the same pc and I used
different ports and addresses such as 127.0.0.1 and the actual address which was 192.168.1.8, ports 12000 and 12010.

I'm using D2006, WinXP, and EDB 1.01

Please advice me and many thanks...

procedure TForm1.Button1Click(Sender: TObject);
var
   vSession: TEDBSession;
begin
   vSession := TEDBSession.Create(nil);
   try
               vSession.Name := 'Session1';
               vSession.AutoSessionName := True;
               vSession.SessionType := stRemote;
               vSession.RemoteAddress := '127.0.0.1';
               vSession.RemotePort := 12000;
               vSession.LoginUser := 'Administrator';
               vSession.LoginPassword := 'EDBDefault';
               vSession.RemoteEncryption := False;
               vSession.Connected := True;
   finally
    vSession.Free;
  end;
end;
Tue, Apr 3 2007 11:25 AMPermanent Link

Alfred Ghazzi
My apologies

I found the problem. It turned up that the components were unicode while the server is not.

Please ignore the message

Many Thanks
Image