I'm connecting from VB.NET 2013 to Access (System.Data.Odbc library, .accdb database format). The first query returns 16 rows and the second query returns 0. Is there some sort of caching problem going on here? Earlier in the code, I do clear out the table and insert the 16 records in.
This returns "16 0"
Dim dt1 As New DataTable, dt2 As New DataTable
Dim cnn As New Odbc.OdbcConnection("Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=" & db & ";")
Dim da1 As New Odbc.OdbcDataAdapter("SELECT * FROM [sys_Current_Cells] WHERE [Inforce Table ID] > -9999", cnn)
Dim da2 As New Odbc.OdbcDataAdapter("SELECT * FROM [sys_Current_Cells] WHERE 1 = 1", cnn)
da1.Fill(dt1)
da2.Fill(dt2)
Debug.Print(dt1.Rows.Count & " " & dt2.Rows.Count)