I am trying to retrive data from MYSQL database.I am using limit to fetch the data.It will fetch two rows instead of fetching ten rows.But when i try to debug it fetches eight rows instead of ten rows.The codes are given below for your reference.
Expand|Select|Wrap|Line Numbers
- private void data(string slimit,string elimit)
- {
- MySqlConnection conn = new MySqlConnection(ss);
- conn.Open();
- try
- {
- MySqlCommand cmd = new MySqlCommand("select iddocument from document_info where scanby is not null limit " + slimit + "," + elimit + ";" , conn);
- //cmd.Parameters.Add("?iddocument", MySqlDbType.VarChar).Value = aa;
- MySqlDataReader myread;
- myread = cmd.ExecuteReader();
- while (myread.Read())
- {
- f.log_insert(myread.GetString(0));
- }
- myread.Close();
- myread.Close();
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- finally
- {
- conn.Close();
- }
Doni