Re: C# and many SQLDataReaders

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Unless your connection supports multiple readers (SQL-Server 2005?),
then do what it says and use a second connection. Alternatively,
arrange your data so that it can all be read with a single reader; e.g.
return one grid with both the parent and child data (switching parent
when you spot e.g. a primary key change value), or return multiple
grids, one per parent; personally, I tend to return a single parent
grid and a single child grid, e.g.)

ParentID, ParentColumn1, ParentColumn2,...
10012,x,x,x
12041,x,x,x

ParentID, ChildID, ChildColumn1, ChildColumn2,...
10012,14411,y,y,y
10012,14134,y,y,y
12041,12452,y,y,y

etc

DataReaders can almost all handle multiple grids.

Marc

.



Relevant Pages

  • Re: Grids and SET SKIP
    ... Form displays fields from the parent dbf ... Bottom grid shows multiple rows from a related/setskip dbf ... Top grid shows rows from the parent database and allows the user to browse ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Grids and SET SKIP
    ... As my forms are getting more complex, I need some guidance on how to handle a form with multiple related grids... ... Form displays fields from the parent dbf ... Top grid shows rows from the parent database and allows the user to browse the parent... ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Grids and SET SKIP
    ... Turn it off and let that parent table browse normally instead of with one ... Form displays fields from the parent dbf ... Bottom grid shows multiple rows from a related/setskip dbf (works ... Top grid shows rows from the parent database and allows the user to ...
    (microsoft.public.fox.programmer.exchange)
  • Grids and SET SKIP
    ... As my forms are getting more complex, I need some guidance on how to handle a form with multiple related grids... ... Form displays fields from the parent dbf ... Top grid shows rows from the parent database and allows the user to browse the parent... ...
    (microsoft.public.fox.programmer.exchange)
  • Re: DataGrid sort
    ... Now when you change rows in your parent grid, ... change out the child grid contents and any existing child sort will be lost. ... > I had high hopes for this solution, but the child table DataGrid remains ...
    (microsoft.public.dotnet.framework.windowsforms)