TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mufid Bagdadi
NA
146
24.4k
Trying to update table in database in c#
May 10 2016 2:38 AM
It is updating 'locationApproval' but can't update 'locationComment', please help me for it. 'locationComment' is multiline textbox.
protected void update_Click(object sender, EventArgs e)
{
string apr;
string cm;
if (!accept.Checked)
{
apr = "Rejected";
cm = comment.Text;
}
else
{
apr = "Accepted";
cm = comment.Text;
}
if (Session["employee"] != null)
{
try
{
string td = Session["employee"].ToString();
con.Open();
cmd.Connection = con;
cmd.CommandText = "UPDATE appData SET locationApproval = '" + apr + "', locationComment = '" + cm + "' WHERE transactionId = '" + td + "';";
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception er)
{
Label1.Visible = true;
Label1.Text = er.Message;
}
}
else
{
Label1.Visible = true;
Label1.Text = "Session Error";
}
}
Reply
Answers (
1
)
How to create Callback url with response msg ?
How to create Dropdown with multiple check box?