Getting error 10053 when working with SQL Azure

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ply
Posts: 11
Joined: Tue 27 May 2008 15:03

Getting error 10053 when working with SQL Azure

Post by ply » Wed 24 Apr 2013 21:54

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;

AndreyZ

Re: Getting error 10053 when working with SQL Azure

Post by AndreyZ » Thu 25 Apr 2013 07:53

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.

ply
Posts: 11
Joined: Tue 27 May 2008 15:03

Re: Getting error 10053 when working with SQL Azure

Post by ply » Mon 29 Apr 2013 09:32

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".

AndreyZ

Re: Getting error 10053 when working with SQL Azure

Post by AndreyZ » Mon 29 Apr 2013 11:35

It's good to see that you've found a solution. If any other questions come up, please contact us.

Post Reply