G
Guilherme Grillo
Friends,
I have a table in the DataBase that have a column with repeated values...
Example
| ID | Values | RepValues |
| 1 | 5 | 1 |
| 2 | 3 | 2 |
| 3 | 7 | 2 |
| 4 | 2 | 2 |
| 5 | 9 | 3 |
| 6 | 1 | 3 |
I do a SELECT like this:
commSELECT = new SqlCommand("SELECT Values FROM contResults WHERE RepValues
= 2 ORDER BY id", conn);
THEN
try
{
conn.Open();
readerSELECT = commSELECT.ExecuteReader(CommandBehavior.CloseConnection);
readerSELECT.Read();
labelResultados.Text += "<i>- " + readerSELECT["contResults"] + "
things</i><br />";
readerSELECT.Close();
It results in:
- 3 things
And what I want is:
- 3 things
- 7 things
- 2 things
What I have to do?
Thanks
Sorry my english
Grillo
I have a table in the DataBase that have a column with repeated values...
Example
| ID | Values | RepValues |
| 1 | 5 | 1 |
| 2 | 3 | 2 |
| 3 | 7 | 2 |
| 4 | 2 | 2 |
| 5 | 9 | 3 |
| 6 | 1 | 3 |
I do a SELECT like this:
commSELECT = new SqlCommand("SELECT Values FROM contResults WHERE RepValues
= 2 ORDER BY id", conn);
THEN
try
{
conn.Open();
readerSELECT = commSELECT.ExecuteReader(CommandBehavior.CloseConnection);
readerSELECT.Read();
labelResultados.Text += "<i>- " + readerSELECT["contResults"] + "
things</i><br />";
readerSELECT.Close();
It results in:
- 3 things
And what I want is:
- 3 things
- 7 things
- 2 things
What I have to do?
Thanks
Sorry my english
Grillo