Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7709607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:54:16+00:00 2026-06-01T00:54:16+00:00

System.Data.SqlClient.SqlConnection conec = new System.Data.SqlClient.SqlConnection(data source= + servidor + ; initial catalog= + basedatos

  • 0
System.Data.SqlClient.SqlConnection conec = new System.Data.SqlClient.SqlConnection("data source=" + servidor + "; initial catalog=" + basedatos + "; user id=" + usuario + "; password=" + contra + "; Connect Timeout=1500;  Packet Size=32767; ");

that is my connection but i got timeout value expired
i changed it to 0 and i got the same message
but when i changed it to my sqlcommand

System.Data.SqlClient.SqlCommand comando = new System.Data.SqlClient.SqlCommand(consulta, conexion);
            comando.CommandTimeout = 0;

it works ok, why doesn´t it work if i have 0 in my connection string? what is
the difference? i have listen about connection lifetime but i don’t have idea about it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T00:54:17+00:00Added an answer on June 1, 2026 at 12:54 am

    Try using:

    Connection Timeout=1500
    

    instead of:

    Connect Timeout=1500
    

    (From the documentation.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have: DataTable Table = new DataTable; SqlConnection = new System.Data.SqlClient.SqlConnection(Data Source= + ServerName
On Error Resume Next Dim SQLData As New System.Data.SqlClient.SqlConnection(Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True) Dim cmdSelect
System.Data.SqlClient.SqlConnection dataConnection = new SqlConnection(); dataConnection.ConnectionString = ConfigurationManager.ConnectionStrings[DBConnectionString].ConnectionString; System.Data.SqlClient.SqlCommand dataCommand = new SqlCommand(); dataCommand.Connection
In my installer, I am using System.Data.SqlClient.SqlConnection(connectionstring) to check if I can connect to
I am getting this error: cannot implicitly convert type 'string' to 'System.Data.SqlClient.Sqlconnection' for this
This works on dev: <connectionString name=asdf value=Data Source=.\;Initial Catalog=fmwebapp1;Integrated Security=True /> <connectionType value=System.Data.SqlClient.SqlConnection, System.Data,
During an ASP.NET page load I'm opening and closing multiple System.Data.SqlClient.SqlConnections inside multiple controls
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters
using System.Data; using System.Data.SqlClient; I am using a SqlCommand cmd.Parameters of SqlDbType.DateTime to create
I'm trying to call the SQL statement below but get the following error: System.Data.SqlClient.SqlException:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.