3 Years
Discussion Span
Last Post by JOSheaIV

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


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


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.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.