0

?

What is your table name and what are the column names in that table?

Which column name is Jake under?

Edited by Unhnd_Exception: n/a

0

table name is finaltickettable

fault_number, reported_date, fault_description, work_group, SubTeam, service_type, pl_number, fault_type, user, datetime

0

I guess user is what your looking for.

Change to:

Command.CommandText = "Select Distinct user" & vbCrLf & _
                       "From finaltickettable" & vbCrLf & _
                       "Where Subteam = @SubTeam"[/code

And mark this thread as solved.

0

please any body help me i can't view the data in the 2nd combo box

        Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
            myConnection = New SqlConnection(connectionstring)
            myConnection.Open()
            If TypeOf ComboBox1.SelectedItem Is String Then

                Dim Reader As SqlDataReader = Nothing
                Dim pc1 As String = ComboBox1.Text
                myCommand1 = New SqlCommand("SELECT Category" & vbCrLf & " FROM Product_Name_List " & vbCrLf & " where Category='" & pc1 & "'", myConnection)

                myCommand1.Parameters.AddWithValue(pc1, CStr(ComboBox1.SelectedItem))
                ComboBox2.BeginUpdate()
                ComboBox2.Items.Clear()
                Try
                    myConnection.Open()
                    Reader = myCommand.ExecuteReader
                    Do While Reader.Read
                        ComboBox2.Items.Add(CStr(Reader("P_Id")))
                    Loop
                Catch ex As Exception

                Finally

                    myConnection.Dispose()
                    myCommand.Dispose()
                    'dispose may not be available with sqldatareader
                    If Reader IsNot Nothing Then Reader.Dispose()
                End Try
                ComboBox2.EndUpdate()
            End If
        End Sub
    End Class

Edited by Dili1234

This question has already been answered. 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.