public int addrow(string sqlcommand) { int res = 0; try { con.Open(); cmd.CommandText = sqlcommand; cmd.Connection = con; cmd.ExecuteNonQuery(); if (cmd.ExecuteNonQuery() == 1) res = 1; } catch (Exception exp) { throw exp; } finally { con.Close(); } return res; }
string command = "insert into caseT values(N'" + caseTxt.Text + "')"; int addRow = db.addrow(command); if (addRow == 1) { MessageBox.Show("inserted"); caseTxt.Text = ""; fillCase(); }
cmd.ExecuteNonQuery(); if (cmd.ExecuteNonQuery() == 1) res = 1;
int res = cmd.ExecuteNonQuery();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)