GENERATE DATEROW FOR EVERY ROW IN A DATASET

Jayden Bell

Total Post:110

Points:774
Posted by  Jayden Bell
VB.Net 
 959  View(s)
Ratings:
Rate this:

Dim diaryreader As SqlDataReader

diarycmd.CommandText = "dashboardusers"

diarycmd.CommandType = CommandType.StoredProcedure

diarycmd.Connection = usersconn

diaryconn.Open()

diaryreader = diarycmd.ExecuteReader()

 

Dim diaryTable As DataTable = New DataTable()

diaryTable.Load(diaryreader)

Dim dr As DataRow

for each (dr in diaryTable.rows)

Next

This is not working, I am getting a syntax error when i try to do for each dr in diarytable.rows

  1. Sumit Kesarwani

    Post:378

    Points:2694
    Re: Generate DateRow for every row in a dataset

    Hi Jayden, 


    You get errors because your braces are set wrong. This would work:

    Dim dr As DataRow

    For Each dr In diaryTable.Rows

    Next

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!