C
Craig G
is there something im doing wrong??
the dataset is cached up until i click a button then when i try to retrieve
it, it justs says its nothing!!
this is code where it gets inserted into the cache
Cache.Insert("myDS", dsResults, Nothing,
System.Web.Caching.Cache.NoAbsoluteExpiration, TimeSpan.FromSeconds(300))
now if i query the cached dataset it shows that there is data in it!!
but once i click my button and this code for the click button runs to try to
retrieve it - it comes back saying the dsResults is 'nothing'
Private Sub btnSearch_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnSearch.Click
Dim strCode As String = txtCode.Text
Dim strDescription As String = txtDescription.Text
Dim strFilter As String
Dim drFilteredRows As DataRow()
Dim dtDataTable As New DataTable
Dim dsResults As DataSet
dsResults = CType(Cache.Item("myDS"), DataSet)
strFilter = "Code='" & strCode & "' AND Description='" & strDescription &
"'"
drFilteredRows = dsResults.Tables(0).Select(strFilter)
the dataset is cached up until i click a button then when i try to retrieve
it, it justs says its nothing!!
this is code where it gets inserted into the cache
Cache.Insert("myDS", dsResults, Nothing,
System.Web.Caching.Cache.NoAbsoluteExpiration, TimeSpan.FromSeconds(300))
now if i query the cached dataset it shows that there is data in it!!
but once i click my button and this code for the click button runs to try to
retrieve it - it comes back saying the dsResults is 'nothing'
Private Sub btnSearch_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnSearch.Click
Dim strCode As String = txtCode.Text
Dim strDescription As String = txtDescription.Text
Dim strFilter As String
Dim drFilteredRows As DataRow()
Dim dtDataTable As New DataTable
Dim dsResults As DataSet
dsResults = CType(Cache.Item("myDS"), DataSet)
strFilter = "Code='" & strCode & "' AND Description='" & strDescription &
"'"
drFilteredRows = dsResults.Tables(0).Select(strFilter)