OK, I'm confused. The below code works fine until I select a
supplierperson that returns a large number of rows. Why does the
MsgBox("HERE") display when in fact the sqlDataAdapter has not
returned the data? I can see a horizontal scroll bar on the
datagridview that I am using, but no data ever appears. What can I do
to let the user know that nothing is happening?
Private ds As DataSet
Dim sqlCN As New SqlClient.SqlConnection
Dim sqlCMD As New SqlClient.SqlCommand
Dim intNumRows As Integer = 0
...connection Stuff goes here (which works fine)
...NOTE: I have taken alot of proprietary stuff out of the
sqlCMD.commandText, but it does work.
sqlCMD.CommandText = "select s.supplierperson,p.personid "
"FROM PRODUCT p WITH (NOLOCK) " & _
"LEFT OUTER JOIN supplier s on s.supplierpersonsid =
sp.supplierpersonsid " &_ "WHERE s.supplierperson LIKE " & "'" &
Me.txtFind.Text & "%'"
Dim da As New SqlDataAdapter(sqlCMD)
Try
ds = New DataSet
da.Fill(ds, "Product")
Catch ex As Exception
MsgBox(ex.Message)
End Try
intNumRows = ds.Tables(0).Rows.Count
MsgBox("HERE")
If intNumRows > 0 Then
SetupGridSupplierPerson()
End If
Douglas J. Steele - 15 Dec 2006 11:12 GMT
This newsgroup is for questions involving VB6 or older.
You might try posting this to a newsgroup that deals with .Net: they all
include "dotnet" in their name.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
> OK, I'm confused. The below code works fine until I select a
> supplierperson that returns a large number of rows. Why does the
[quoted text clipped - 34 lines]
> SetupGridSupplierPerson()
> End If
Bob - 17 Dec 2006 01:58 GMT
And there's a Given: Post into the wrong Usenet group, and you will
get an immediate response.
>This newsgroup is for questions involving VB6 or older.
>
>You might try posting this to a newsgroup that deals with .Net: they all
>include "dotnet" in their name.