Arkadaşlar aşağıdaki hata iletisini alıyorum. İngilizcem çok zayıf olduğu için yabancı forum sitelerinde derdimi anlatamadım. lütfen yardım ediniz. hatamı düzeltebilecek arkadaş yok mu. çok genel fikir veriyorlar kodumun düzeltilmesi edilmesi gerekiyor.
Error CS7036 There is no argument given that corresponds to the required formal parameter 'cell' of 'Form1.InsertRow(OleDbConnection, string)' test1 c:\users\asus\documents\visual studio 2017\Projects\test1\test1\Form1.cs 103 Active
for (int i = 1; i <= 1000 && (datagrid1.RowCount > i); i++)
{
InsertRow(datagrid1.Rows.Cells[1].Value.ToString()); // teka a error message "cell"
}
void InsertRow(OleDbConnection conn, string cell)
{
string patch = Application.StartupPath + "\\data.mdb";
DateTime month;
if (DateTime.TryParseExact(cell, "MM.yyyy", null, DateTimeStyles.None, out month))
{
InsertMonth(month.AddMonths(-1));
InsertMonth(month);
}
}
void InsertMonth(DateTime month)
{
string patch = Application.StartupPath + "\\data.mdb";
using (var conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + patch))
using (var cmd = conn.CreateCommand())
{
cmd.Connection.Open();
cmd.CommandText = "insert into period (a) values (?)";
cmd.Parameters.AddWithValue("?", month.ToString("MM/yyyy"));
cmd.ExecuteNonQuery();
}
}
private void addemptyperiodbutton_Click(object sender, EventArgs e)
{
for (int i = 1; i <= 1000 && (datagrid1.RowCount > i); i++)
{
InsertRow(datagrid1.Rows.Cells[1].Value.ToString()); // teka a error message "cell"
}
perioddublicateclean();
datagrid2load();
}
PROJE DOSYASI BURDA
http://www.c-sharpcorner.com/forums/uploadfile/2bec8f/08052017174819PM/test1.rar
asp sitesinde bir yanıt alabildim biraz:
acces table to acces table data transfer error
Error CS7036 There is no argument given that corresponds to the required formal parameter 'cell' of 'Form1.InsertRow(OleDbConnection, string)' test1 c:\users\asus\documents\visual studio 2017\Projects\test1\test1\Form1.cs 103 Active
for (int i = 1; i <= 1000 && (datagrid1.RowCount > i); i++)
{
InsertRow(datagrid1.Rows.Cells[1].Value.ToString()); // teka a error message "cell"
}
void InsertRow(OleDbConnection conn, string cell)
{
string patch = Application.StartupPath + "\\data.mdb";
DateTime month;
if (DateTime.TryParseExact(cell, "MM.yyyy", null, DateTimeStyles.None, out month))
{
InsertMonth(month.AddMonths(-1));
InsertMonth(month);
}
}
void InsertMonth(DateTime month)
{
string patch = Application.StartupPath + "\\data.mdb";
using (var conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + patch))
using (var cmd = conn.CreateCommand())
{
cmd.Connection.Open();
cmd.CommandText = "insert into period (a) values (?)";
cmd.Parameters.AddWithValue("?", month.ToString("MM/yyyy"));
cmd.ExecuteNonQuery();
}
}
private void addemptyperiodbutton_Click(object sender, EventArgs e)
{
for (int i = 1; i <= 1000 && (datagrid1.RowCount > i); i++)
{
InsertRow(datagrid1.Rows.Cells[1].Value.ToString()); // teka a error message "cell"
}
perioddublicateclean();
datagrid2load();
}
PROJE DOSYASI BURDA
http://www.c-sharpcorner.com/forums/uploadfile/2bec8f/08052017174819PM/test1.rar
asp sitesinde bir yanıt alabildim biraz:
acces table to acces table data transfer error