dt = New DataTable("Answered") dt.Columns.Add("Serial", GetType(Integer)) dt.Columns.Add("question", GetType(String)) dt.Columns.Add("choice1", GetType(String)) dt.Columns.Add("choice2", GetType(String)) dt.Columns.Add("choice3", GetType(String)) dt.Columns.Add("choice4", GetType(String)) dt.Columns.Add("correct", GetType(String)) dt.Columns.Add("questionImage", GetType(Bytes)) dt.Columns.Add("selected", GetType(Integer)) 'this code is for adding to the table TEST Dim r As DataRow For Each r In ds.Tables("vExamQuestionsda").Rows dr = dt.NewRow dr("Serial") = dt.Rows.Count + 1 dr("question") = r.Item("question") dr("choice1") = r.Item("choice1") dr("choice2") = r.Item("choice2") dr("choice3") = r.Item("choice3") dr("choice4") = r.Item("choice4") dr("correct") = r.Item("correct") dr("questionImage") = r.Item("questionImage") dr("selected") = -1 dt.Rows.Add(dr) Next
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)