DataSet Scope
The problem I am having is that if I try to access my dataset outside of the event where it was filled, it is empty. I added the dataset to the page using the IDE, so I thought once it was filled it was public, this does not seem to be the case. Why, what is it's scope?
In order to try to get around calling the SQL again, I placed the dataset into a session variable. I tried to set the datasource of a data grid using it. dg1.datasource = Session("var"). It did not like this. So, I tried to convert the session to a dataset using CType, it does not like that either.
How can I make my dataset global so I do not have to keep hitting the database? I just want to fille the ds once and access it from anywhere in the page.
Thanks!!
Jim
|