Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Apr 30, 2012 07:59 PM|LINK
You can declare a page level variable to store the results for your query and then reuse it.
Protected dsResults As DataSet
Protected Function LoadComments()
Dim dsComments As DataSet
'Add other validation here, eg - check for tables and rows, etc.
If Not IsNothing(dsResults) Then
dsComments = dsResults
'go to db and perform your sql command
If you need to persist this dataset across postbacks, you can look at moving it to viewstate or session as well.