H
H
Hirty2016-06-12 10:26:01
WPF
Hirty, 2016-06-12 10:26:01

Add record and save (data source)?

I connected the access database and displayed it like this.

OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\Log.accdb");
            OleDbDataAdapter da = new OleDbDataAdapter("SELECT * FROM log", conn);
            DataSet ds = new DataSet();
            da.Fill(ds, "log");
            dataGrid.ItemsSource = ds.Tables["log"].DefaultView;

Tell me how now to add data and save all this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2016-06-12
@yarosroman

EntityFramework. Especially when using WPF, the object fits well with the MVVM pattern and data binding.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question