Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
6
Reply
Having a problem with inserting data into database
Qasim Hafeez
Jan 28 2017 2:38 PM
316
Reply
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();
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
6
)
Next Recommended Forum
Create whatsAapp chat using C# Windows Applicaiton
Need help in how to call a method group from other form