junaidsoomro
New member
- Joined
- Oct 28, 2013
- Messages
- 3
- Programming Experience
- Beginner
This is my Statment:
But When I'm submit, Showing Query Successfully Submitted but in the Table its blank
Can someone guide me what is the problem?
Thanks
protected void Button1_Click(object sender, EventArgs e) { try { //if (Operators.ConditionalCompareObjectEqual(this.Session["Order_Dup_Status"], "yes", false)) { this.DB_cn = new SqlConnection(); this.DB_cn.ConnectionString = "Data Source=172.16.4.8;Initial Catalog=anDb;User ID=sa; Password= ;"; if (this.DB_cn.State == ConnectionState.Closed) { this.DB_cn.Open(); } this.DB_Cmd = new SqlCommand(); this.DB_Cmd.Connection = this.DB_cn; string strins = "INSERT into vendortbl(companybox, remarksbox) VALUES ('" + this.CompanyNameBox.Text + "','" + this.RemarksBox.Text + "')"; this.DB_Cmd.CommandText = strins; //this.DB_Cmd.ExecuteNonQuery(); if (this.DB_cn.State == ConnectionState.Open) { this.DB_cn.Close(); } this.QuerySubmitedLabel.Visible = true; } } catch (NullReferenceException exception1) { ProjectData.SetProjectError(exception1); //Exception exception = exception1; NullReferenceException exception = exception1; //this.Lbl_Order_Message.Visible = true; //this.Lbl_Order_Message.Text = exception.Message.ToString(); ProjectData.ClearProjectError(); }
But When I'm submit, Showing Query Successfully Submitted but in the Table its blank
Can someone guide me what is the problem?
Thanks
Last edited by a moderator: