Arg81
Well-known member
Ok, may come across a bit dumb but I've been sat thinking on this.
My search form can call 4 different ways to fill - @AccountManager, @Technician, @WorkID or @CustomerID
The searches (except @WorkID) will bring back more than 1 row. Some Account Managers still have +50 active projects.
In my previous app (.net 1.1) and at the start of this app I just loaded the child data after the search, using @WorkID - so only the related child data was loaded.
To overcome selecting different rows, I re-ran the query on the Click event of each navigational button.
Now, is this the best way to access child data? Although the table has quite a lot of rows, the data being recorded isn't that large.
I've now set it so that all rows from the child table are filled on Form_Load. Then no matter what search you use, no matter how many times you press the navigational buttons, the child data will always appear in the grid for the correct WorkID because I have the grid set to display the relation.
I've never played around with Stored Procedures, maybe that is ultimately the best way?
I have roughly 30 users across 3 sites. Normally the maximum number on at any one time is 10 or less because of time differences.
Just wanting advice as to what is the best approach. I've stuck with option 2 for now (fill all rows on form load) because if a search yields 50 results and someone wants to look through all of them, the application is not having to connect and pull the data from SQL every time they click Next or Previous......
Thanks!
My search form can call 4 different ways to fill - @AccountManager, @Technician, @WorkID or @CustomerID
The searches (except @WorkID) will bring back more than 1 row. Some Account Managers still have +50 active projects.
In my previous app (.net 1.1) and at the start of this app I just loaded the child data after the search, using @WorkID - so only the related child data was loaded.
To overcome selecting different rows, I re-ran the query on the Click event of each navigational button.
Now, is this the best way to access child data? Although the table has quite a lot of rows, the data being recorded isn't that large.
I've now set it so that all rows from the child table are filled on Form_Load. Then no matter what search you use, no matter how many times you press the navigational buttons, the child data will always appear in the grid for the correct WorkID because I have the grid set to display the relation.
I've never played around with Stored Procedures, maybe that is ultimately the best way?
I have roughly 30 users across 3 sites. Normally the maximum number on at any one time is 10 or less because of time differences.
Just wanting advice as to what is the best approach. I've stuck with option 2 for now (fill all rows on form load) because if a search yields 50 results and someone wants to look through all of them, the application is not having to connect and pull the data from SQL every time they click Next or Previous......
Thanks!