Advertisement

07.03.2008 at 08:04AM PDT, ID: 23537108
[x]
Attachment Details

SQL DataAdapter timeout issue

Asked by gwosgood in Microsoft Visual Basic.Net

Tags: Microsoft VB.NET 2005

Hello experts!

I have an application that queries a database and populates a datagrid based on the results.  On the top of the form, there are a few optional parameters where users can enter data to filter the search query.  When the user enters data into the PartNmb parameter field, the application throws a timeout exception when populating the SQL Data Adapter.

Is there any way I can adjust the default timeout for the SQL adapter?  I have already set the default ConnectString timeout to 60, however this doesnt seem to come in to play.


Thank you in advance for you help!


Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
Dim PBPUconn As String = "Persist Security Info=False;Integrated Security=SSPI;database=PBPSalesHistory;server=FPSQL01\SQL2005;Connect Timeout=60"
 
' populate the DataGrid
Me.Cursor = Cursors.WaitCursor
Dim myTable As New DataTable
Dim cmdFillForm As New SqlDataAdapter(QueryString, PBPUconn)
Try
    cmdFillForm.Fill(myTable)
 
    Catch ex As Exception
         MessageBox.Show(ex.Message)
End Try
 
DataGridView1.DataSource = myTable
cmdFillForm.Dispose()
myTable.Dispose()
Me.Cursor = Cursors.Default
[+][-]07.03.2008 at 08:20AM PDT, ID: 21926313

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 08:26AM PDT, ID: 21926398

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Tags: Microsoft VB.NET 2005
Sign Up Now!
Solution Provided By: jcoehoorn
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.03.2008 at 08:46AM PDT, ID: 21926606

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628