我有一张包含9条记录的表格。 当我运行' SELECT * FROM table;'在我的VB.Net中,我只从9条记录中获得6条。 当我在“数据库浏览器”中运行查询时一个SQLite查看器我得到了所有。 这是我的代码:
Dim SQLconn As New SQLite.SQLiteConnection()
SQLconn.ConnectionString = connstring
If SQLconn.State = ConnectionState.Open Then SQLconn.Close()
Dim SQLcmd As New SQLiteCommand
Dim SQLdr As SQLiteDataReader
Dim SQLstr As String
SQLstr = "SELECT * FROM SignedEvent;"
SQLconn.Open()
SQLcmd.Connection = SQLconn
SQLcmd.CommandText = SQLstr
SQLdr = SQLcmd.ExecuteReader()
SQLcmd.Dispose()
While SQLdr.Read()
ListBox1.Items.Add(SQLdr("TotalTicketCounter").ToString)
End While
SQLdr.Close()
SQLconn.Close()
SQLconn.Dispose()