DataTables as Session object issues?
-
Besides memory consumption, are there any issues I should be aware of when keeping DataTables in a session object? Here's my situation: When a user adds a new entry into the database, there are of course a pile of related child tables that have to be filled in as well. When working with a new record, there won't be an valid ID for the parent record so I'm doing everything in memory until the user hits 'save'. I've already got a couple of my GridViews working fine but I was wondering if there where any gotcha's. Thanks!
-
Besides memory consumption, are there any issues I should be aware of when keeping DataTables in a session object? Here's my situation: When a user adds a new entry into the database, there are of course a pile of related child tables that have to be filled in as well. When working with a new record, there won't be an valid ID for the parent record so I'm doing everything in memory until the user hits 'save'. I've already got a couple of my GridViews working fine but I was wondering if there where any gotcha's. Thanks!
My 1 cent to this 1) May be you can try using a staging table in db to store this temporay values and when the user hits save; copy from staging to the main table. 2) Or Create a view state object and add the data table to it.
Thanks Laddie Kindly rate if the answer was helpful
-
My 1 cent to this 1) May be you can try using a staging table in db to store this temporay values and when the user hits save; copy from staging to the main table. 2) Or Create a view state object and add the data table to it.
Thanks Laddie Kindly rate if the answer was helpful
- So have a set of duplicate temp tables in the database? Maybe use the user's id as the record IDs. 2) Question, why would you use view state over session objects? I guess the view state would save memory on the server but it wouldn't the increased page size slow down the user's browser? I guess using AJAX update panels would help with that. Thanks for your response!
-
- So have a set of duplicate temp tables in the database? Maybe use the user's id as the record IDs. 2) Question, why would you use view state over session objects? I guess the view state would save memory on the server but it wouldn't the increased page size slow down the user's browser? I guess using AJAX update panels would help with that. Thanks for your response!
- Ya, UserID,Session ID cound serve as he primary key and when the user clicks save copy and insert to the main table and delete the same from temp table. 2) a) The good thing of View sate over the session variables is that you can dispose then once done with it. b) Update panel does nothing more than hiding the user from seeing a full page refresh by interepting post back.Behind the Scenes it does everything that needs to be done with out its presence.
Thanks Laddie Kindly rate if the answer was helpful
-
Besides memory consumption, are there any issues I should be aware of when keeping DataTables in a session object? Here's my situation: When a user adds a new entry into the database, there are of course a pile of related child tables that have to be filled in as well. When working with a new record, there won't be an valid ID for the parent record so I'm doing everything in memory until the user hits 'save'. I've already got a couple of my GridViews working fine but I was wondering if there where any gotcha's. Thanks!
-
Besides memory consumption, are there any issues I should be aware of when keeping DataTables in a session object? Here's my situation: When a user adds a new entry into the database, there are of course a pile of related child tables that have to be filled in as well. When working with a new record, there won't be an valid ID for the parent record so I'm doing everything in memory until the user hits 'save'. I've already got a couple of my GridViews working fine but I was wondering if there where any gotcha's. Thanks!
Create a custom class that's stored in Session with it's own Save() method that will write to the DB. The DataTable probably has more information than you need and will waste more memory by storing it in Session. You can bind all your GridViews to the class just as easy.
-
Create a custom class that's stored in Session with it's own Save() method that will write to the DB. The DataTable probably has more information than you need and will waste more memory by storing it in Session. You can bind all your GridViews to the class just as easy.
That seems like the best solution. Use an array to hold the data and built an interface around it. Thanks!