skip to main | skip to sidebar

codeFinds()

The "Ten Commandments", if you will, of .NET development. Definitely not limited to ten, nor groundbreaking by any means, this blog emphasizes simple code that any .NET developer should know; without the fluff and bloated code examples. "Just show me how to..."

Monday, December 29, 2008

Loop through a DataSet

Assuming your DataSet (named, ds) is already populated with Data and contains only one table:

For Each DataRow As DataRow In ds.Tables(0).Rows
   Dim outData as String
   outData = DataRow("fieldName").toString
Next
Posted by Jourdan at 8:24 AM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Code Archive

  • ►  2009 (9)
    • ►  May (1)
    • ►  April (1)
    • ►  February (2)
    • ►  January (5)
  • ▼  2008 (23)
    • ▼  December (11)
      • Convert DateTime in MSSQL
      • Add JavaScript from CodeBehind
      • Get record count from ObjectDataSource
      • Format a Phone Number
      • Execute Code On Enter from Textfield
      • Zoom to points on Google Maps
      • Loop through a DataSet
      • Use a Generic Dictionary
      • Access Field(s) from FormCode in an InfoPath Form
      • Protect Javascript
      • Validate Decimals with Javascript
    • ►  November (1)
    • ►  October (2)
    • ►  August (3)
    • ►  July (5)
    • ►  January (1)
  • ►  2007 (8)
    • ►  December (1)
    • ►  November (4)
    • ►  October (3)

Contributors

  • Jourdan
  • jp

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

My Blog List

  • The Agile Developer
    -