Hi guys,
I'm currently studying ADO.net and I used video which I got from learnvisualstud io.net. I follow a the tutorial and I was able to create a simple apps which can load its content. My problem right now is that when I clicked the add and save, I was able to add/save but the database is not updated. Upon investigating the source code, I have'nt found a code regarding connection. What i remember is that during adding of the datasource, all of them are popup and created automatically. My question right now is how can I see/update the data on the database? I put code generated below.
[CODE=cpp]namespace ADOTest2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeCompo nent();
}
private void customerBinding NavigatorSaveIt em_Click(object sender, EventArgs e)
{
this.Validate() ;
this.customerBi ndingSource.End Edit();
this.customerTa bleAdapter.Upda te(this.myCompa nyDataSet.Custo mer);
}
private void Form1_Load(obje ct sender, EventArgs e)
{
// TODO: This line of code loads data into the 'myCompanyDataS et.Customer' table. You can move, or remove it, as needed.
this.customerTa bleAdapter.Fill (this.myCompany DataSet.Custome r);
}
private void button1_Click(o bject sender, EventArgs e)
{
Form2 f2 = new Form2();
f2.Show();
}
}
}[/CODE]
I'm currently studying ADO.net and I used video which I got from learnvisualstud io.net. I follow a the tutorial and I was able to create a simple apps which can load its content. My problem right now is that when I clicked the add and save, I was able to add/save but the database is not updated. Upon investigating the source code, I have'nt found a code regarding connection. What i remember is that during adding of the datasource, all of them are popup and created automatically. My question right now is how can I see/update the data on the database? I put code generated below.
[CODE=cpp]namespace ADOTest2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeCompo nent();
}
private void customerBinding NavigatorSaveIt em_Click(object sender, EventArgs e)
{
this.Validate() ;
this.customerBi ndingSource.End Edit();
this.customerTa bleAdapter.Upda te(this.myCompa nyDataSet.Custo mer);
}
private void Form1_Load(obje ct sender, EventArgs e)
{
// TODO: This line of code loads data into the 'myCompanyDataS et.Customer' table. You can move, or remove it, as needed.
this.customerTa bleAdapter.Fill (this.myCompany DataSet.Custome r);
}
private void button1_Click(o bject sender, EventArgs e)
{
Form2 f2 = new Form2();
f2.Show();
}
}
}[/CODE]
Comment