Cache is not available in ASP.NET

M

Marko

I have some code which put DataSet in Cache. But I have run time error
"Cache is not available". This is my code:

dsObject = Cache("Translate")
If dsObject Is Nothing Then
odbConn = New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Putanja)

SQL = "SELECT * FROM Translate_text WHERE ID='" & Word & "'"

odbAdapt = New OleDbDataAdapter(SQL, odbConn)
dsObject = New DataSet
odbAdapt.Fill(dsObject)
Cache.Insert("Translate", dsObject)
End If
dtObject = dsObject.Tables(0)

How to fix this problem? Do I need to change something in Windows or IIS or
mybe I need to write some aditional code?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top