0

connectionString="Data Source=########;Initial Catalog=DowntimeD51;Persist Security Info=True;User ID=#######;Password=########;Connection Timeout=120;Encrypt=False;TrustServerCertificate=False;Network Library=dbmssocn"

I have the above connection string in a vb windows application , This is part of my app config file.

I then have a number of table adapters for connecting my business logic to the database , One of the queries inparticular is a pretty large one and requires extra time to complete however the connection is getting a timeout error. When I checked the adapter connection with Dim connection2 As Int32 = Adapter1.Connection.ConnectionTimeout This shows the connection time out to be 120 seconds but the timeout is still occuring after 30 seconds.

I was wondering if there was some inheritance rules i am missing or something hopefully someone will notice something i am missing .

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by steveh000
0

Did you set CommandTimeout?

Dim command As New SqlCommand(sqlQuery, _Database.Connection)
command.CommandTimeout = 10 'some value
0

Dim command As New SqlCommand(sqlQuery, _Database.Connection)
command.CommandTimeout = 10 'some value

I Tried Adapter1.Connection.CreateCommand.CommandTimeout = 120 but again this is not working , I have checked in my settings designer and the time out comand is set for 120 but is still timeing out after 30 seconds . I am not sure what else to do ?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.