0
I created a project in VB.NET in it when searching for the code shows me the total of record that that call has, but I need it in descending order since when searching my form always loads the last record.
Follows the Code -
Private Sub CarregaTabela()
' ----- Pega a Qtd do registro de um chamado -------------
stSQL = "SELECT COUNT(*) AS QTD FROM PROVIDENCIA WHERE COD_OCORRENCIA = '" + txtCodOcorrencia.Text.PadLeft(10, "0") + "' "
comCommand = New OleDb.OleDbCommand(stSQL, conBase)
comCommand.CommandType = CommandType.Text
darProvidencia = comCommand.ExecuteReader()
darProvidencia.Read()
dtx = Convert.ToInt32(darProvidencia("QTD"))
End Sub
'----------- Páginação - posição dos botões ----------------------------------------------------
Private Sub MovimentarRegistro(ByVal e As eRegistro)
Select Case e
Case eRegistro.Primeiro
If posicao > 0 Then posicao -= 1
Case eRegistro.Ultimo
If posicao < (dtx - 1) Then posicao += 1
Case Else
posicao = dtx - 1
End Select
End Sub
Att,