4
Contributors
5
Replies
19
Views
3 Years
Discussion Span
Last Post by JOSheaIV
0

well i don't do c# programing but i can just provide the logic behind this:-

retrieve data using select query and then concatente these column values. I think + may help you to do this(concatenate).

Edited by rishif2

0

Well I'll assume you know how to extract the values from the DB with an SQL query. Once there it's rather easy

All you need to do is create a for loop, and extract each value and pass it into a string. Then have another string that you simply append to. Something along these lines

string tempString = "";
StringBuilder combinedString = new StringBuilder();

for(int i = 0; i < columnCount; i++)
{
    tempString = "extracted value from database is passed to this string";
        //replace that string with what is said

    combinedString.Append(tempString).Append(",");
}

textBox1.Text = combinedString.ToString();

I used StringBuilder because it works better for large amounts of data (I mean night and day difference).

Is this what yo uare asking

This question has already been answered. Start a new discussion instead.
Be sure to adhere to our posting rules.