I'm trying (using SQL and VB.Net) to get a list of dates and strings (representing a film name) using a SELECT command, and then look through each of the 'dates' in the list, one after the other. Like a 'FOR EACH' loop.
I'm not entirely sure how to do this, but here's what I have so far:
Dim Con = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;DataSource=ApplicationData.accdb;Persist Security Info=False;") Con.Open() 'Open the connection Dim Cmd As New OleDbCommand("SELECT fDateAdded, fName FROM Films", Con) Cmd.CommandType = CommandType.Text Dim Rdr As OleDbDataReader = Cmd.ExecuteReader() Dim schemaTable As DataTable = Rdr.GetSchemaTable() Dim row As DataRow Dim column As DataColumn For Each row In schemaTable.Rows For Each column In schemaTable.Columns ' WHAT TO DO HERE? Next Next
How can I go about achieving my goal?