Click here to Skip to main content
16,004,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataTable - DataGrid Pin
Jay Shankar17-May-04 16:07
Jay Shankar17-May-04 16:07 
GeneralRe: DataTable - DataGrid Pin
Moon Boy17-May-04 18:20
Moon Boy17-May-04 18:20 
GeneralRe: DataTable - DataGrid Pin
Jay Shankar17-May-04 20:34
Jay Shankar17-May-04 20:34 
GeneralRe: DataTable - DataGrid Pin
Heath Stewart18-May-04 3:55
protectorHeath Stewart18-May-04 3:55 
GeneralA strange question I think Pin
Christer Claesson17-May-04 12:16
Christer Claesson17-May-04 12:16 
GeneralRe: A strange question I think Pin
Colin Angus Mackay17-May-04 12:57
Colin Angus Mackay17-May-04 12:57 
GeneralRe: A strange question I think Pin
Christer Claesson17-May-04 13:07
Christer Claesson17-May-04 13:07 
GeneralRe: A strange question I think Pin
Colin Angus Mackay18-May-04 0:42
Colin Angus Mackay18-May-04 0:42 
Cenatar wrote:
what happens when I get a project from the server(or database) and I want to see what resources that is connected to it?

What do you mean? That depends on how you want to implement it, what technologies are abailable and so on.

If you are concerned about large ammounts of data transferring in one go you could implement a lazy fetch algorithm. In other words, you get the project as your starting point. Then if you need to iterate through the list of resources, you'll access that collection through a property and the internal code of the property checks whether the information is available yet and if not builds the collection by fetching the relevant data from the database. The resource object will expose properties that get you to the project and employee with a lazy fetch algorithm, since the project already exists that reference will be reused, but since the employee doesn't exist in your application any attempt to get the employee property will, for the first time, perform a database lookup.

Be warned that over zealous use of lazy fetch (aka lazy lookup) algorithms can hurt performance, however some uses, like in matrix classes (and this is more of a lazy calculation, than lookup) can work very well if you don't need to know everything about the matrix. As a general rule, try and fetch as much as possible in one request (without fetching so much the user is left waiting) because it reduces network traffic (one request and lots of data in the reply, rather than lots of requests and lots of replies - which probably won't fill network packets efficiently).

Does this help?



"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar

The Second EuroCPian Event will be in Brussels on the 4th of September


GeneralMailto via code with attachment option Pin
myNameIsRon17-May-04 10:26
myNameIsRon17-May-04 10:26 
GeneralRe: Mailto via code with attachment option Pin
Heath Stewart17-May-04 10:52
protectorHeath Stewart17-May-04 10:52 
Generalregd Datagrid Pin
karteek17-May-04 8:39
karteek17-May-04 8:39 
GeneralRe: regd Datagrid Pin
Heath Stewart17-May-04 8:53
protectorHeath Stewart17-May-04 8:53 
GeneralRe: regd Datagrid Pin
Jay Shankar17-May-04 23:11
Jay Shankar17-May-04 23:11 
GeneralRe: regd Datagrid Pin
karteek17-May-04 23:19
karteek17-May-04 23:19 
GeneralRe: regd Datagrid Pin
Jay Shankar17-May-04 23:38
Jay Shankar17-May-04 23:38 
Generalmanaging the edit of a dataGrid Pin
HappyPaws17-May-04 8:36
HappyPaws17-May-04 8:36 
GeneralRe: managing the edit of a dataGrid Pin
Heath Stewart17-May-04 8:51
protectorHeath Stewart17-May-04 8:51 
GeneralDirectShow filters Pin
ro_angel_bv17-May-04 8:36
ro_angel_bv17-May-04 8:36 
Generalinterface members as internal Pin
Mike Hodnick17-May-04 7:50
Mike Hodnick17-May-04 7:50 
GeneralRe: interface members as internal Pin
Heath Stewart17-May-04 8:03
protectorHeath Stewart17-May-04 8:03 
GeneralRe: interface members as internal Pin
Mike Hodnick17-May-04 9:26
Mike Hodnick17-May-04 9:26 
GeneralBitmap file Pin
Saleh Alshadheli17-May-04 6:45
Saleh Alshadheli17-May-04 6:45 
GeneralRe: Bitmap file Pin
Dave Kreskowiak17-May-04 6:55
mveDave Kreskowiak17-May-04 6:55 
GeneralRe: Bitmap file Pin
Heath Stewart17-May-04 7:21
protectorHeath Stewart17-May-04 7:21 
GeneralPotential Field Algorithms Pin
sodium17-May-04 6:45
sodium17-May-04 6:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.