0
그리고 내 캐시가 비어 있는지 확인하는 방법입니다. 캐시가 null인지, 스토어드 프로 시저를 실행하는지 확인하려고 할 때 모든 구문 오류가 발생합니다.캐시를 데이터 테이블로 설정하고 읽는 중 문제가 발생했습니다.
If RadioButtonList1.SelectedIndex = 0 Then
If Cache["netcache"] = null Then
bcmd.CommandText = "yearlynetsales"
Else
btable = cache["netcache"]
end if
If RadioButtonList1.SelectedIndex = 1 Then
If Cache["salescache"] = null Then
bcmd.CommandText = "yearlysales"
Else
btable = cache["salescache"]
end if
end if
이 내가 내 캐시
이 VB.NET과 같은If RadioButtonList1.SelectedIndex = 0 Then
Cache.Insert("netcache", bTable)
ElseIf RadioButtonList1.SelectedIndex = 1 Then
Cache.Insert("salescache", bTable)
ElseIf RadioButtonList1.SelectedIndex = 2 Then
Cache.Insert("cxsalescache", bTable)
ElseIf RadioButtonList1.SelectedIndex = 3 Then
Cache.Insert("cxvaluecache", bTable)
ElseIf RadioButtonList1.SelectedIndex = 4 Then
Cache.Insert("othersalescache", bTable)
ElseIf RadioButtonList1.SelectedIndex = 5 Then
Cache.Insert("inssalescache", bTable)
End If
그게 유일한 문제는 무엇이며 어떻게 캐시에있는 데이터 테이블을 설정할 수 있습니다 – MyHeadHurts
글쎄 그게 구문 오류를 볼 수 있습니다. 다시 데이터베이스로 업데이트하려면 저장 프로 시저를 실행하여 데이터를 업데이트해야합니다. 질문에 DB 호출을하는 코드는 보이지 않습니다. – XtremeBytes