hi i want to show entire column data from sql and show in a single textbox with ","

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 3 Years Ago by rishif2

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.