I have been using Windows Forms up until now and am starting with WPF. I am using Visual C# Express 2008.
I have used the Add Data Source wizard to add an Access Database to my file. In WinForms I simply drag a DataGrid onto the form and it asks me what database I want to fill it. I select the one i just added and it works splendidly. I can use LINQ to easily access and manipulate the data. When I check the code it has generated this appears:
private void Form1_Load(object sender, EventArgs e)
{
this.tblMoviesTableAdapter.Fill(this.moviesDataSet.tblMovies);
}
Now to my problem: I simply cannot get the database into WPF. I have tried a listview with code similar to what appears above. I have downloaded the WPF Toolkit, which has a Datagrid, and i still simply cannot get my database into the damn grid/listview etc. so that I can view or manipulate data.
What is the declaration code for outside databases? Is it a XAML binding? I have tried that too but can't get it to work. The name of the database is Movies.accdb.
I have searched the internet exhaustively for any answer, and also checked the 2 books on WPF i have (WPF Unleashed and WPF in Action). However, I simply cannot find a simple tutorial that shows one how to import an Access Database into WPF and use LINQ to manipulate and view data!
If someone could help me I'd greatly appreciate it.
Thanks

New Topic/Question
Reply




MultiQuote



|