开发者

Using multiple tables with ADO.net and C#

开发者 https://www.devze.com 2022-12-20 19:23 出处:网络
I\'ve just started working with Visual Studio and C#, and am trying to solve a small problem I have.I come from a Microsoft Access background, and have quite a bit of experience with database queries

I've just started working with Visual Studio and C#, and am trying to solve a small problem I have. I come from a Microsoft Access background, and have quite a bit of experience with database queries and forms.

However, I am currently trying to re-implement an access database with C#, ADO.net, and Windows Forms. Visual Studio makes it easy to create a form based on one table, but I have not yet found out how to make a form based on data from multiple tables.

Is there a way to do this th开发者_开发技巧rough the Visual Studio interface? If not, how do I do it in code?

Any information will be appreciated, including links and tutorials, although I have already looked at a few of these and not understood them. I can't work out how to convert from displaying data in ASP (which most tutorials seem to use) to displaying records in a list box, or sequentially on a screen.


Check out this Master/Detail tutorial from MSDN: http://msdn.microsoft.com/en-us/library/aa984462(VS.71).aspx

Hopefully that will get you going in the right direction.

pk


you probably need to have look at data access methodologies


  • The ADO.NET Entity Framework Overview
  • Windows Forms Object Data Binding
  • Windows Forms Data Binding

hope this helps


You can also use the dataview class http://msdn.microsoft.com/en-us/library/fdcwwhez.aspx which provides sorting, additional filtering, derived columns and several other bits of functionality that is similar to the Access query object in some respects.

0

精彩评论

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