vendredi 27 janvier 2017

VB.NET - Random selection of rows

I am currently building a multiple choice type of test in vb.net and I want to know how to select it randomly.

I have a table named 'Exercise' and it has column 'Question' and 'Answer' in it.

I want to retrieve the questions (10 items) in-order (and then store it in one textbox each item) but retrieve the answers randomly (one textbox each item as well) to avoid adjacent question and its correct answer.

I'm not used to looping that's why I'm having a hard time. Any help would be much appreciated. Thanks.




Aucun commentaire:

Enregistrer un commentaire