mercredi 8 avril 2015

C# Sql executereader maximum return

What is the maximum amount of rows that can be returned by ExecuteReader? I have some 67 rows in a table and it only returns the first 20.


Heres a piece of my source:



SQLiteConnection sDBConnection = new SQLiteConnection("Data Source=Database.ddb;Version=3");
sDBConnection.Open();
string sqlCom = "SELECT * FROM Table1";
SQLiteCommand scdCommand = new SQLiteCommand(sqlCom, sDBConnection);
SQLiteDataReader reader = scdCommand.ExecuteReader();
while(reader.Read())
{
string Value1 = (string)reader["Col1"];
bool Value2 = true;
string Value3 = (string)reader["Col2"];
object[] row = { Value1, Value2, Value3, Value4, Value5 };
DataGridView1.Rows.Add(row);
}
reader.Close();
sDBConnection.Close();


Of course, the values that aren't in the while loop are defined elsewhere.


Aucun commentaire:

Enregistrer un commentaire