|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
can I write a select ..where.. against a table in a dataset?I have a master and detail table in sql server. Say the master has 10 rows and detail has 45 rows. I fill 2 tables in my dataset in the client app. When I iterate through the master table in the client app, I display the row contents in Textboxes. I want to display the corresponding detail data for each row in a datagrid. My question is if I can pull the master and detail data and populate the corresponding tables in the dataset in the client app only once and then query that data in the client so that when I am at row 1 (ID = 1) in the master table I populate the detail data in the datagrid from the detail table in the dataset with detail rows where ID = 1? Or do I have to pull the detai data from the datasource each time for each ID in the master table? If I can query the detail data at the client app - how is this done? I am using VB2005. Can we write select statements against tables in a dataset? Thanks, Rich There are several approches you can use so you only have to pull the
data once. Search google for Master Detail vb.net. Also look into using the currency manager or dataview.rowfilters Here is a good example from Microsoft to get started with...
http://www.sarcedalloy.com/18 Build a Master-Details Windows Form.zip Thank you for your replies. I will search for Master Detail vb.net
http://www.sarcedalloy.com/18 I was not able to open the link above. But I will keep searching. Note: I am using a currency manager. The dataview sounds interesing. Rich Show quoteHide quote "Charlie Brown" wrote: > Here is a good example from Microsoft to get started with... > > http://www.sarcedalloy.com/18 Build a Master-Details Windows Form.zip > > Rich,
Use the datagrid's setbinding method to bind to a datarelation. http://www.vb-tips.com/default.aspx?ID=3eafa9ea-a906-45ff-aece-e8335682ad3a Ken ---------------- Show quoteHide quote "Rich" wrote: > Hello, > > I have a master and detail table in sql server. Say the master has 10 rows > and detail has 45 rows. I fill 2 tables in my dataset in the client app. > When I iterate through the master table in the client app, I display the row > contents in Textboxes. I want to display the corresponding detail data for > each row in a datagrid. > > My question is if I can pull the master and detail data and populate the > corresponding tables in the dataset in the client app only once and then > query that data in the client so that when I am at row 1 (ID = 1) in the > master table I populate the detail data in the datagrid from the detail > table in the dataset with detail rows where ID = 1? Or do I have to pull the > detai data from the datasource each time for each ID in the master table? > > If I can query the detail data at the client app - how is this done? I am > using VB2005. Can we write select statements against tables in a dataset? > > Thanks, > Rich
Check if Component is not disposed?
Change Screen Resolution in VB.NET????? Problem adding currency in VB6 Understanding tcpListener Class name for current instance How to view objects properties for DataBind MDI Form controls VB Resource Kit Socket API Documentation? Help needed to locate Documentation Authoring Tool for VB.Net 2.0 |
|||||||||||||||||||||||