Solved

VB.NET and SQL 7 Connection Timeout

Posted on 2002-05-14
5
345 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 100 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

733 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