Imports System.web.caching.cache vedi capitolo 3 pag. 74 ado.net hoepli cache("CacheDataset") = MyDataset cache.Add("CacheDataset") = MyDataset cache.insert("CacheDataset") = MyDataset cache.get("CacheDataset") = MyDataset ' per recuperare un dataset In memoria Dim MyDataset As dataset = Ctype(cache.get(CacheDataset"),Dataset) ' se in memoria non c'era nulla allor asi forma il dataset: If MyDataset = Nothing Then Dim MyAdapter As New SqldataAdapter("Select Pippo from Tabella", Connessione) MyDataSet = New Dataset(() MyAdapter.fill(MyDataset,"Tabella") endif |