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
adnan
NA
4
4.2k
problem with saving data from DataGrid to Base
Aug 7 2010 12:18 PM
Hi people, I try to set up a control button functionality to save the entry data to the database. I wrote the code in C# and when I try to use it I get no errors, but thay wont to save the data. Here is the code i hope that someone will halp me.
And finally the code:
private void btnSnimi_Click(object sender, EventArgs e)
{
this.korisnikBindingSource.EndEdit();
//this.BindingContext[dsAB1, "stud"].EndCurrentEdit();
if (this.katvDataSet1.HasChanges()/*this.dsAB1.HasChanges()*/)
{
try
{
if (konekcija.State == ConnectionState.Closed) { konekcija.Open(); MessageBox.Show("otvorena konekcija"); }
korisnikTableAdapter.Update(katvDataSet1.korisnik);
//sqlDAStud.Update(dsAB1, "stud");
MessageBox.Show("Snimljene sve izmjene!");
}
catch (System.Exception eSnimi)
{
MessageBox.Show("GRESKA: " + eSnimi.Message);
}
finally
{
konekcija.Close();
}
}
else
{
MessageBox.Show("Nema promjena za snimanje!");
}
}
Reply
Answers (
2
)
gridviewrow operation
C# Crystal Report Error-Help required