Log Navigation C#

Asked

Viewed 570 times

1

I have Two buttons: Next and Previous in a Windows Forms application in C#, I am using an SQL statement:

SELECT * FROM aluno LIMIT 1; 

for MYSQL. This statement takes the first record.

Now comes the dilemma, I’m not managing to navigate records (bring all students).


I’m using this code:

if (Contador < Tabela.Rows.Count - 1){}

But the counter variable is taking the second record and not the first.

  • 1

    Hello. Look here how to create a clear question.

  • I think I was clear, I need to click the next button and browse the Tablea record

  • Try to improve formatting, show your attempts, better your question so it can help more users.

  • Maybe this helps, I found this code, http://www.linhadecodigo.com.br/artigo/2961/accessingDos-com-textboxes-botoes-navegacao.aspx Only it is made for access as it will be in C# for mysql

1 answer

1

For navigation, it is required to consult bringing all students:

SELECT * FROM aluno

Bringing only one record, the student list will come with only one record.

  • You can pass me by example

  • @Fabríciosimonealanamendes I can, but I need to know how is your screen, what has been done so far. Include this code in your question.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.