When I retrieve data from my Access database to a multiline TextBox, it shows all my data in the same line. In the DataGridView everything is fine and shows line by line. How to make my textboxes to show data line by line as well?
con.Open();
OleDbCommand cmd = new OleDbCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "select * from data where [ID] like(" + textBox9.Text + ")";
cmd.Connection = con;
var reader = cmd.ExecuteReader();
while (reader.Read())
{
textBox1.Text = reader["Target Name"].ToString();
}
"\r\n"orEnvironment.NewLine. On a side note, you must have a look to Parameterized Query