开发者

WPF application with MS Access database as a data source

I have a Microsoft Access 2010 database(*). Now, using Visual Studio 2010, I want to create a WPF application and add the database as a data sourc开发者_运维百科e. The app will have a window with a frame that provides navigation through pages. No problem so far. But:

-What is the right way to set up the database in this scenario? Tables only? Or must everything go via queries? (VS2010 talks about views which I assume (?) are queries)

-Database data must be updatable and records can be added. Some relationships go through link tables (many-to-many) and there are nullable foreign key relationships. Must I take manual steps to make it work?

-While adding the data source VS2010 created an xsd from my Access database. I think the xsd might need further tweaking for the application to work the right way. What if I change my Access database design, I'd have to regenerate the xsd again as well. Is this right, and is it the way it is usually done? OR, should I let the original Access database go and give the application the capability to create new empty databases?

-How do you provide controls in a page to step through the records in a table? Is there a special database control?

-What is the way (WPF class?) to load records into the data context that displays in a page? (At this level it probably does not matter what type of data source it is.)

(*) A single user desktop database


This is not the exact answer to the question. But an alternative.

Is this a single-user database?

You can try this better and highly efficient combination:

  • SQLITE (DataBase)
  • DBLINQ (ORM)
  • LINQ(a .NET framework component for querying the db)

You should also take a look at ObservableCollection, DataBinding and DataGrid in WPF toolkit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜