Thanks for you response Kevin. See inline below...Jim
Kevin Yu said:
Hi J. Clay,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that it takes about 30 seconds to fill the
third table in you typed Dataset. If there is any misunderstanding, please
feel free to let me know
This is correct. The interesting thing is that SQL Profiler shows that the
query is complete instantly.
..
I would like to ask a few more questions here.
1. How many records are there in the 3 tables? Is the last table much
bigger than the other 2?
Table 1 (Primary table): 40 Records
Table 2: 191 Records
Table 3 (Problem table): 40 records
2. What OS are you working on?
XP SP1 (pro) - Unable to upgrade to SP2 due to incompatibility issues. That
is the reason for this project.
SQLServer 2000 SP3
3. How did you create the SqlDataAdapter? Did you create one DataAdapter
and return multiple result sets or did you create 3 DataAdapter and fill
each table seperately? I suggest you create 3 DataAdapters to fill the
DataSet seperately.
3 Seperate DataAdapters
It would be helpful if you can provide some of your
Private Sub FillContactDataSet()
Try
Me.ContactInfo1.ContactOrganizations.Clear()
Me.ContactInfo1.Address.Clear()
Me.ContactInfo1.ContactDetails.Clear()
Me.dadContactOrganizations.SelectCommand.Parameters("@ContactID").Value =
ContactID
Me.dadContactOrganizations.Fill(ContactInfo1.ContactOrganizations)
Me.dadContactDetails.SelectCommand.Parameters("@ContactID").Value =
ContactID
Me.dadContactDetails.Fill(ContactInfo1.ContactDetails)
Me.dadAddress.SelectCommand.Parameters("@ContactID").Value = ContactID
Me.dadAddress.Fill(ContactInfo1.Address)
'*************The above fill is called, SQL Profile shows that query
returned immediately, but code does not resume for approx 37 seconds. ****
Catch e As System.Exception
MessageBox.Show(String.Format("Error: {0}", e.Message), "LCP CRM",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub