Input string was not in a correct format when converting value from database into integer C# : I have a problem in converting string from database to integer. When I look at Locals, that variable show the value but notification still says that there is something wrong. Anyone can help me, please ?

   

    OleDbConnection kon = new OleDbConnection(koneksi);
    OleDbCommand command1 = kon.CreateCommand();
                
    kon.Open();
    string selectkoordgaris = "select * from koordinatgaris where namakamera = '" + PilihKameraComboBox.Text + "'";
    command1.CommandText = selectkoordgaris;
    OleDbDataReader bacakoordgaris = command1.ExecuteReader();   
         
    while (bacakoordgaris.Read())
      {        
        var templateGaris = Directory.GetFiles(@"D:\Dokumen\Alfon\TA Alfon\CobaFitur\Template\Garis\" + bacakoord["namakamera"].ToString());
                
    foreach (var fileGaris in templateGaris)
     {
        counterbanyakgaris++;
        Image<Bgr, byte> garis = new Image<Bgr, byte>(fileGaris);
                
        for (cntgaris = 0; cntgaris < banyakgaris; cntgaris++)
         {
          int x1garis = int.Parse(bacakoordgaris["x" + ((cntgaris * 4) + 1) + "garis"].ToString()); //here the error. It says Input string was not in a correct format
          int x2garis = int.Parse(bacakoordgaris["x" + ((cntgaris * 4) + 2) + "garis"].ToString());
          int y1garis = int.Parse(bacakoordgaris["y" + ((cntgaris * 4) + 1) + "garis"].ToString());
          int y2garis = int.Parse(bacakoordgaris["y" + ((cntgaris * 4) + 2) + "garis"].ToString());
          int y3garis = int.Parse(bacakoordgaris["y" + ((cntgaris * 4) + 3) + "garis"].ToString());
                
          int gariswidth = x2garis - x1garis;
          int garisheight = y3garis - y2garis;
                }
            }
        }