Want to build the ChatGPT based Apps? Start here
Become a member
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
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Qasim Hafeez
2k
67
2.1k
Having a problem with inserting data into database
Jan 28 2017 2:38 PM
HI there, i tried a lot but i think im missing something here and i really could not find out, for me it seems to be right.
when i run the program and fill the forms the i get an error on savechanges() method ...
using (var db = new StudentEntities())
{
var add = new Book_Record
{
Book_Id = Int32.Parse(txtID.Text),
Book_Title = txtTitle.Text,
Book_Type = txtType.Text,
Book_Author = txtAuthor.Text,
Book_Edition = txtEdition.Text,
Book_IssuedBy = txtIssuedBy.Text,
Book_IssuedTo = txtIssuedTo.Text
};
db.Book_Record.Add(add);
db.SaveChanges();
}
Reply
Answers (
6
)
need help in WhatsApp registration tool(WART)
Passing Class from Click event to function.