?
Solved

VB.NET and SQL 7 Connection Timeout

Posted on 2002-05-14
5
Medium Priority
?
347 Views
Last Modified: 2013-11-23
I get a Connection Timeout when loading my table into my datagrid. When trying to modify the timeout with modify connection and then changing the value of the connection timeout, it fails again. When comparing the two timeouts it hasn't changed so it isn't saved.

What am i doing wrong? What is the best way to change the limit of the connection timeout, its a big query so it needs much more time. There are over 2 million entry's in my table

Thanks

Frederik
0
Comment
Question by:FrederikBonte
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:trkcorp
ID: 7009534
I assume ADO...
You are aware that there is a ConnectionTimeout on the connection, obviously, but there is also a CommandTimeout for a command object, and the 2 don't influence one another.  The CommandTimeout can be applied to both the connection and/or a command object.  Now here is some M$ doubletalk:
"The CommandTimeout setting on a Connection object has no effect on the CommandTimeout setting on a Command Object on the same Connection; that is, the Command object's CommandTimeout property does not inherit the value of the Connection object's CommandTimeout value."  
The connection timeout is used on a connection object if: "delays in network traffic or heavy server use make it necessary to abandon a connection attempt.  If the time from the ConnectionTimeout property setting elapses prior to the opening of the connection, an error occurs and ADO cancels the attempt.  If you set the property to zero, ADO will wait indefinitely until the connection is opened.
The ConnectionTimeout property is read/write when the connection is closed and read-only when the connection is open.  On a Connection object, the CommandTimeout property remains read/write after the Connection is opened."
0
 
LVL 4

Expert Comment

by:trkcorp
ID: 7009580
IE; I think you need to use the CommandTimeout rather than the ConnectionTimeout...
0
 

Author Comment

by:FrederikBonte
ID: 7010331
Where do I put this CommandTimeOut


I created a connection using the Server Explorer and then took my SQL table and draged it to the form. There I let my SQLAdapter generate a dataset which I connect to my DataGrid.

I don't use ADO, I use OLE for SQL

Thanks Again

Frederik
0
 
LVL 4

Accepted Solution

by:
trkcorp earned 400 total points
ID: 7011203
Well then, it might help if you were to post the code that handles the connection and database access. In short; you would want to adjust any time out prior to any open.
0
 

Author Comment

by:FrederikBonte
ID: 7258826
sorry for the late responds
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question