sloan
10/3/2006 8:50:00 PM
Did you try null checking it?
if(null!=dataSet)
{
if (null!=dataSet.Tables["Svc"])
{
//null checks pass ok
Cache.Insert("Svc_Table", dataSet.Tables["Svc"]);
}
}
"Keithb" <noreply@dslextreme.com> wrote in message
news:e2poqca5GHA.940@TK2MSFTNGP03.phx.gbl...
> Can someone please point out what I am doing wrong here? The statement:
>
> Cache.Insert("Svc_Table", dataSet.Tables["Svc"]);
>
> causes the following compiler error:
>
> "An object reference is required for the nonstatic field, method, or
> property 'System.Web.Caching.Cache.Insert(string, object)'
> C:\Interfaces\App_Code\FileSystemAccess.cs 37 9 C:\Interfaces\"
>
> Any suggestions will be appreciated.
>
> Thanks,
>
> Keith
>
>
>