I am developing a memory matchgame which is supposed to get words and their translations from access database which has 3 columns ID, word and translation. The program has 52 buttons. What i want is that on load the program should assign these words and translations at random to my 52 buttons Text.. I really don't know how to accomplish this

I have managed to connect to the database using a connectionstring

public partial class Form1 : Form
{
    private OleDbConnection connection = new OleDbConnection();
    Random random = new Random();

    public Form1()
    {
        InitializeComponent();
        AssignToButtons();
        connection.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\DZINGO\Documents\Visual Studio 2015\Projects\new game\matchwords.accdb;
        Persist Security Info=False;";
    }
}

0 Answers