Timeout Connectiostring

Asked

Viewed 32 times

0

I have a question about the Timeout value that can be passed in Connectionstring, this value is related to seconds or milestones?

  <connectionStrings>
    <add name="MyConnection" connectionString="meu banco;provider connection string=data source=servidor;initial catalog=banco;user id=user;password=senha;App=EntityFramework;Timeout=5;" providerName="System.Data.EntityClient" />
  </connectionStrings>

2 answers

2


Timeout property refers to the time limit on seconds to create the BD connection.

But the correct name would be Connect Timeout.

You can refer to the list of all connectionString properties for Sql Server here

  • thanks for observing the name of the property, already corrected here.

1

This value is in seconds if your database is sql Sever, I believe it will change according to each database, since this connection string is sent to the DBMS (Data Base Management System), that is, to the database server. This parameter is responsible for the timeout that the application will establish the connection to the DBMS server, not the execution time of the command.

  • Got it now, @Vinicius thanks so much for your help.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.