Abdullah Abdulkarim
asked on
Access Database connected to App C#
I got problem with visual studio C# connection to Access database, when I tried to insert data in the app, I see it entered but when I close the app and check the database it self , It is showing nothing in the database . I do not know why it is not saved in the database since there is connection and I checked it gave me success .
code:
code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Haspital_HadithahEmplyeeSys1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void employeeDataBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.employeeDataBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.healthCareDataDataSet);
}
private void Form1_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'healthCareDataDataSet.EmployeeData' table. You can move, or remove it, as needed.
this.employeeDataTableAdapter.Fill(this.healthCareDataDataSet.EmployeeData);
}
private void employeeDataBindingSource_AddingNew(object sender, AddingNewEventArgs e)
{
this.employeeDataTableAdapter.Update(this.healthCareDataDataSet);
}
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Can you post the connection string please and also post the actual database file location you are checking you may be looking at the wrong database file.
ASKER
Okay i will send it you but i need some time because i am out side of work.
ASKER
Thank you for your respond quick.
Not a problem. 👍
@Abdullah Abdulkarim, please update this question. Thank you.
Should have corrected the issue.
ASKER
Open in new window