Page 1 of 1

Getting error 10053 when working with SQL Azure

Posted: Wed 24 Apr 2013 21:54
by ply
I am testing UniDAC with Azure SQL. When pc is idle (5 minutes or more) i am getting error 10053.
I tried solution in this thread (http://forums.devart.com/viewtopic.php? ... 053#p36742) but it didnt help

My connection settings:

Code: Select all

object UniConnection1: TUniConnection
  ProviderName = 'SQL Server'
  Options.KeepDesignConnected = False
  Options.LocalFailover = True
  PoolingOptions.MinPoolSize = 5
  PoolingOptions.Validate = True
  Pooling = True
  Server = 'xxq4x4fwrj.database.windows.net,1433'
  Connected = True
  LoginPrompt = False
  AfterConnect = UniConnection1AfterConnect
  OnError = UniConnection1Error
  OnConnectionLost = UniConnection1ConnectionLost
end
Procedures:

Code: Select all

procedure Tglobalmodule.UniConnection1Error(Sender: TObject; E: EDAError;
  var Fail: Boolean);
begin

if not uniconnection1.Connected then begin
  if pos('Error locating Server',e.Message)>0 then begin
    e.Message:='Server not found';
    sm(e.Message);
    fail:=false;
  end
  else
    try
      Uniconnection1.Connect;
    finally
    end;
end;

sm('DB error #'+inttostr(e.ErrorCode)+': '#13+e.Message);

if (e.ErrorCode=10054)or(e.ErrorCode=10053) then begin
  //WLRestartApplication;
end;

end;

procedure Tglobalmodule.UniConnection1ConnectionLost(Sender: TObject;
  Component: TComponent; ConnLostCause: TConnLostCause;
  var RetryMode: TRetryMode);
begin
RetryMode := rmReconnectExecute;
end;

Re: Getting error 10053 when working with SQL Azure

Posted: Thu 25 Apr 2013 07:53
by AndreyZ
Hello,

If you run your application from IDE, you will see all exceptions, handled and unhandled. If you run the executable file of your application, you will see only unhandled exceptions. Please check if you obtain any errors when you run the executable file of your application.

Re: Getting error 10053 when working with SQL Azure

Posted: Mon 29 Apr 2013 09:32
by ply
In about 90% everything works fine, but still getting this error...
Finally I found solution when it works 100%. I put timer for 1 minute to execute simple query "SELECT 1".

Re: Getting error 10053 when working with SQL Azure

Posted: Mon 29 Apr 2013 11:35
by AndreyZ
It's good to see that you've found a solution. If any other questions come up, please contact us.