Trying to get records to resort when this menu item is clicked, the text is showing up by its not reordering. Is there a concept im missing here?
VB.NET:
Private Sub MenuItem10_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem10.Click
'not yet working?
Dim intposition As Integer
Dim objcommand As SqlCommand = New SqlCommand
intposition = objcurrencyManager.Position
objcommand.Connection = objconnection
objcommand.CommandText = "SELECT * FROM ProspectTable ORDER BY StudentID"
objcommand.CommandType = CommandType.Text
objconnection.Open()
Try
objcommand.ExecuteNonQuery()
Catch sqlexceptionerr As SqlException
MessageBox.Show(sqlexceptionerr.Message)
End Try
objconnection.Close()
FillDataSetandView()
BindFields()
objcurrencyManager.Position = intposition
Showposition()
StatusBar1.Text = "Records Sorted By Student ID."
End Sub