Home > DeveloperSection > Forums > Generate DateRow for every row in a dataset
Jayden Bell
Jayden Bell

Total Post:105

Points:739
Posted on    August-23-2014 8:30 AM

 VB.Net VB.Net 
Ratings:


 1 Reply(s)
 711  View(s)
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



Sumit Kesarwani

Total Post:378

Points:2694
Posted on    August-23-2014 8:37 AM

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


Don't want to miss updates? Please click the below button!

Follow MindStick