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
Bineesh Viswanath
NA
1k
780.2k
Data Insertion Error in ASP.NET
Aug 23 2013 1:18 AM
Sir, I getting an error in Save function in ASP.NET
This is funtion I does:-
value in comboBox represent className's classId
divisionName is a new value I Inserting.
And the error arising is:-
The C# code for this function is:-
public void DivisionAdd(divisionInfo infoDivision)
{
try
{
if (sqlCon.State == ConnectionState.Closed)
{
sqlCon.Open();
}
SqlCommand c = new SqlCommand("divisionAdd", sqlCon);
c.CommandType = CommandType.StoredProcedure;
c.Parameters.Add("divisionName", SqlDbType.VarChar).Value = infoDivision.divisionName;
c.Parameters.Add("classId", SqlDbType.Decimal).Value = infoDivision.classId;
int inCount = c.ExecuteNonQuery();
if (inCount > 0)
{
HttpContext.Current.Response.Write("<script>alert('Saved Successfully');</script>");
}
}
catch (Exception)
{
throw;
}
finally
{
sqlCon.Close();
}
}
Please help me in this topic.
Reply
Answers (
5
)
search is not working
ASP.NET DataGridView Update