Solved

VB.NET and SQL 7 Connection Timeout

Posted on 2002-05-14
5
340 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
  • 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now