Using foreach Loop

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vit159
    New Member
    • May 2007
    • 1

    #1

    Using foreach Loop

    I have Data Recive it from stordProceder and i want to Get this data using foreach loop to equal it with local variable
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by vit159
    I have Data Recive it from stordProceder and i want to Get this data using foreach loop to equal it with local variable
    What have you tried so far?
    How are you retrieving your data from the database?
    Could you please post a snippet of code with what you've tried so far and better explain the problem?

    Please check out this .Net article on how to use a database in your program.

    Once you've stored all the information you've retrievd from your store proceedure into a data reader you'll have to use a while loop to get the information out of it.

    Eg.
    [code=vbnet]
    While myDataReader.Re ad
    TextBox1.Text = TextBox1.Text + " " + CType( dr.Item("FieldN ame"), String)
    End While
    [/code]

    Comment

    Working...