Retrieve database data linked to PersonID and show in listbox
<p>So i've created a application that is linked to a MS Acces database. I have a login system and when the login is succesful, their Personal data is displayed in some textboxes. One of these textboxes shows their PersonID (the ID for acces database).</p>

<p>User can make a appointment. This will be written in the database under UserID - Appointment date - Treatment. I want to retrieve this info and shows it into my listbox. But don't know why, because it needs to only retrieve the data that is linked to the logged in UserID ofcourse.</p>

<p>I have something like this but i'm stuck right now.</p>

<pre><code>connection.Open();
        OleDbCommand command = new OleDbCommand();
        string afspraken = "select * from Appointments where PersonID = '" + textBox4.Text + "'";
        OleDbDataReader reader = command.ExecuteReader();
        listBox2.DataSource = reader;
        connection.Close();
</code></pre>