I have a vb.net program that runs a stored function and fills a dataset. However, due to the amount of information pulled, sometimes it times out on certain databases.
How can I increase the timeout of the query so as not to get hit with a timeout?
In my form button I have the following code that is NOT working (it still times out and the program errors)
Me.1TableAdapter.Connection.ConnectionString = "Data Source=10.0.1.1;Initial Catalog=Database;Persist Security Info=True;User ID=USER;Password=PASSWORD; Connection Timeout = 120"
Me.1TableAdapter.Fill(Me.Dataset.1, TodayDt, TodayEnd)
Me.2TableAdapter.Fill(Me.Dataset.1, TodayDt, TodayEnd)
I get the error message:
System.Data.SQLClient.SQLException: Timeout expired. The timeout period elapsed piror to the completion of the operation or the server is not responding.