แล้วผม ต้องการให้มันเรียงชื่ออ่ะครับ A-Z ผมรู้ว่าใช้ ODER BY แต่ผมไม่รู้จะเอาไปใส่ตรงไหน T^T Code (VB.NET)
Private Sub cbYear_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbYear.SelectedIndexChanged
cbYear.ResetText()
cbMS.ResetText()
'---------------------------------------------------------
Dim TD3 As New ConnectDb
TD3.OpenConn()
Dim dty As New DataTable
dty = TD3.ReadData("select * from Model where Data = '" & cbData.SelectedValue.ToString & "' and Series = '" & cbSeries.SelectedValue.ToString & "' and Year = '" & cbYear.SelectedValue.ToString & "'")
TD3.CloseConn()
cbMS.DataSource = dty
'cbMS.DisplayMember = "Model"
'cbMS.ValueMember = "Year"
cbMS.DisplayMember = "Model"
cbMS.ValueMember = "ModelSerial"
End Sub
dty = TD3.ReadData("select * from Model where Data = '" & cbData.SelectedValue.ToString & "' and Series = '" & cbSeries.SelectedValue.ToString & "' and Year = '" & cbYear.SelectedValue.ToString & "' ORDER BY Model ASC ")