请帮忙。 当我点击提交按钮,所以我收到一个错误。请帮帮我
try
{
btnUpload.Visible = true;
con = new SqlConnection("Data Source=.;Initial Catalog=DSIIDC2;Integrated Security=True");
con.Open();
string str = "insert into addcaasedetails(caseno,casetype) values(" + txtcaseno.Text + ",'" + txtcasetype.Text + "')";
cmd = new SqlCommand(str, con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables["addcaasedetails"] == txtcaseno.Text && ds.Tables["addcaasedetails"].ToString()==txtcasetype.Text.ToString())
{
btnUpload.Visible = false;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}