time ou error
-
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. when i try to read large amount of data from online and add it to my combo box this error occurs what can i do... send me suggesstions...
-
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. when i try to read large amount of data from online and add it to my combo box this error occurs what can i do... send me suggesstions...
-
Hi, Is this exception raised when you tried to fetch data from database server,then set the Connection Time out property to 0 (infinite). Tarun Singh
public SqlConnection objCon = new SqlConnection("Data Source=VEESERV2;Initial Catalog=Inventory_VS;User ID=sa;Password=sa;Connect Timeout = 60"); is it right?
-
public SqlConnection objCon = new SqlConnection("Data Source=VEESERV2;Initial Catalog=Inventory_VS;User ID=sa;Password=sa;Connect Timeout = 60"); is it right?
kulandaivel_mca2007 wrote:
User ID=sa
Seriously - Never connect to your database as "sa" you've just punched a very large security hole in your application.
kulandaivel_mca2007 wrote:
Connect Timeout = 60
This is the amount of time you are willing to wait for the connection to be established. It defaults to 15 seconds. Your error message suggests that you have already made the connection, you are just waiting for the results. You therefore need to set the
CommandTimeout
on the command object. It defaults to 30 seconds. I do not advise setting to 0 (infinite) as your program will hang until it has the result. If your query is taking so long, you should also look optimising it. It may be that your query or database are set up very inefficiently.* Developer Day Scotland 2 - Free community conference * The Blog of Colin Angus Mackay
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
-
public SqlConnection objCon = new SqlConnection("Data Source=VEESERV2;Initial Catalog=Inventory_VS;User ID=sa;Password=sa;Connect Timeout = 60"); is it right?
That means that you wait for the connection for 60 seconds max. As Colin pointed out there are several issues in your connection string. However, if you're executing a query, is it really a problem in geting the connection or is the problem occuring when executing the query (after a connection is made). If it's in the query, the connection timeout has nothing to do with the problem. In that case you should try to optimize the query itself.
The need to optimize rises from a bad design.My articles[^]