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
Yusif Wassal
NA
12
2.8k
Visual Controls How to effect Database
Oct 12 2012 2:56 AM
Hello,
I am using visual components to build a program with VS 2010 C# and MS Access.
It working well except it does not effect the database while it reads correctly from database.
here us some of the code
for saving to database:
private void button2_Click(object sender, EventArgs e)
{
this.Validate();
this.drugTypeBindingSource.EndEdit();
tableAdapterManager.UpdateAll(pharmaDataSet);
}
for new record:
private void button4_Click(object sender, EventArgs e)
{
f1.Text = "";
f2.Text = "";
newCustomersRow = pharmaDataSet.Tables["drugType"].NewRow();
newCustomersRow["DName"] = f1.Text.ToString();
newCustomersRow["Description"] = f2.Text.ToString();
pharmaDataSet.Tables["drugType"].Rows.Add(newCustomersRow);
drugTypeBindingSource.MoveLast();
DataGridViewDataErrorContexts cntxt = new DataGridViewDataErrorContexts();
dg.CommitEdit(cntxt);
drugTypeBindingSource.MoveLast();
f1.Text = "";
f2.Text = "";
}
for delete :
private void button3_Click(object sender, EventArgs e)
{
try
{
drugTypeBindingSource.RemoveCurrent();
}
catch (Exception)
{
}
}
Reply
Answers (
0
)
What is the infragistics and where can I download it from ? I need the version for visual studio 2010 ultimate edition :)
What is MVC4 ,what are the new features in mvc4?