Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6704551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:18:06+00:00 2026-05-26T07:18:06+00:00

I’m just taking over an asp.net/vb site, and I’m definitely still learning. I’m receiving

  • 0

I’m just taking over an asp.net/vb site, and I’m definitely still learning. I’m receiving the following error: BC30451: ‘ByOwner’ is not declared. It may be inaccessible due to its protection level.

I call a datasource with:

<asp:GridView ID="CaseCountByOwner" runat="server" AllowSorting="true" DataSourceID="ByOwner"

And here’s what is in the codefile:

     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    HitMe.AddHit(Request.UserHostAddress, Request.UserAgent, Request.Url.ToString)

    Dim user As String = Request.QueryString("user")
    If user.Length() = 0 Then
        Return
    Else

        ByOwner.SelectCommand = "select " & _
 "TU.login_name as Owner," & _
 "( select " & _
     "   count(1)" & _
  "from table_case TC1 with (NOLOCK) " & _
  "join table_user TU1 with (NOLOCK) on TU1.objid = TC1.case_owner2user " & _
  "join table_gbst_elm TGE1 with (NOLOCK) on TGE1.objid = TC1.casests2gbst_elm  " & _
        "where TC1.case_wip2wipbin Is Not null " & _
        "and TC1.x_casetype not in ('Esc- Support','CRel - Wellness') " & _
  "and TU1.login_name = TU.login_name " & _
  "and TGE1.title not in ('File CR') " & _
 ") as AllCases," & _
 "( select " & _
        "count(1)" & _
  "from table_case TC2 with (NOLOCK) " & _
  "join table_user TU2 with (NOLOCK) on TU2.objid = TC2.case_owner2user " & _
  "join table_gbst_elm TGE2 with (NOLOCK) on TGE2.objid = TC2.casests2gbst_elm  " & _
        "where TC2.case_wip2wipbin Is Not null " & _
        "and TC2.x_casetype not in ('Esc- Support','CRel - Wellness') " & _
  "and TGE2.title not in ('File CR','Suggested Resolution','Suggestion Filed','Await SW Rel/Dev','Pending ClientAction') " & _
  "and TU2.login_name = TU.login_name" & _
 ") as Workable," & _
 "( select " & _
        "count(1)" & _
  "from table_case TC3 with (NOLOCK) " & _
  "join table_user TU3 with (NOLOCK) on TU3.objid = TC3.case_owner2user " & _
  "join table_gbst_elm TGE3 with (NOLOCK) on TGE3.objid = TC3.casests2gbst_elm  " & _
  "join table_gbst_elm SEVERITY3 with (NOLOCK) on TC3.respsvrty2gbst_elm = SEVERITY3.objid " & _
        "where TC3.case_wip2wipbin Is Not null " & _
        "and TC3.x_casetype not in ('Esc- Support','CRel - Wellness') " & _
  "and SEVERITY3.title in ('Down','Critical - ANF') " & _
  "and TGE3.title not in ('File CR','Suggestion Filed','Await SW Rel/Dev','Pending ClientAction') " & _
  "and TU3.login_name = TU.login_name" & _
 ") as DownCritical, " & _
  "(    select " & _
        "count(1)" & _
  "from table_case TC4 with (NOLOCK) " & _
  "join table_user TU4 with (NOLOCK) on TU4.objid = TC4.case_owner2user " & _
  "join table_gbst_elm TGE4 with (NOLOCK) on TGE4.objid = TC4.casests2gbst_elm  " & _
        "where TC4.case_wip2wipbin Is Not null " & _
        "and TC4.x_casetype not in ('Esc- Support','CRel - Wellness') " & _
  "and TGE4.title in ('Testing Data') " & _
  "and TU4.login_name = TU.login_name" & _
 ") as TestingData " & _
"from table_user TU with (NOLOCK)" & _
"where TU.login_name in (select TU.login_name from table_employee TE with (NOLOCK) " & _
"join table_user TU with (NOLOCK) on TE.employee2user = TU.objid and TU.status = 1 " & _
"where TE.emp_supvr2employee = (select EMPTE.emp_supvr2employee " & _
"from table_user EMPTU with (NOLOCK) " & _
"join table_employee EMPTE with (NOLOCK) on EMPTE.employee2user = EMPTU.objid " & _
"where EMPTU.login_name like ('" & user & "') " & _
")) " & _
"order by 1 "
    End If


End Sub
Dim casesTotal As Integer = 0
Dim workableTotal As Integer = 0
Dim downTotal As Integer = 0
Dim testingTotal As Integer = 0
Protected Sub CaseCountByOwner_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
    If e.Row.RowType = DataControlRowType.DataRow Then
        casesTotal += (DataBinder.Eval(e.Row.DataItem, "AllCases"))
        workableTotal += (DataBinder.Eval(e.Row.DataItem, "Workable"))
        downTotal += (DataBinder.Eval(e.Row.DataItem, "DownCritical"))
        testingTotal += (DataBinder.Eval(e.Row.DataItem, "TestingData"))
    ElseIf e.Row.RowType = DataControlRowType.Footer Then
        e.Row.Cells(0).Text = "Totals:"
        e.Row.Cells(1).Text = casesTotal
        e.Row.Cells(2).Text = workableTotal
        e.Row.Cells(3).Text = downTotal
        e.Row.Cells(4).Text = testingTotal

        e.Row.Font.Bold = True
    End If
End Sub

Protected Sub UpdateTimer_Tick(ByVal sender As Object, ByVal e As System.EventArgs)
    LiveQueue.DataBind()
    LabelLiveQueue.Text = "Updated: " + DateAndTime.Now.ToString()
End Sub
Protected Sub UpdateTimer2_Tick(ByVal sender As Object, ByVal e As System.EventArgs)
    LiveAgents.DataBind()
    LabelLiveAgents.Text = "Updated: " + DateAndTime.Now.ToString()
End Sub
Dim callsTotal As Integer = 0
Dim offeredTotal As Integer = 0
Dim handledTotal As Integer = 0
Protected Sub LiveQueueGridView_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
    If e.Row.RowType = DataControlRowType.DataRow Then
        callsTotal += (DataBinder.Eval(e.Row.DataItem, "Holding"))
        offeredTotal += (DataBinder.Eval(e.Row.DataItem, "Offered"))
        handledTotal += (DataBinder.Eval(e.Row.DataItem, "Handled"))
    ElseIf e.Row.RowType = DataControlRowType.Footer Then
        e.Row.Cells(0).Text = "Totals:"
        e.Row.Cells(1).Text = callsTotal
        e.Row.Cells(3).Text = offeredTotal
        e.Row.Cells(4).Text = handledTotal

        e.Row.Font.Bold = True
    End If
End Sub

Dim TotalCalls As Int32 = 0
Function GetCalls(ByVal Calls As Int32) As Int32
    TotalCalls += Calls
    Return Calls
End Function
Function GetTotal() As Int32
    Return TotalCalls
End Function


Protected Sub BtnExportGrid_Click(ByVal sender As Object, ByVal args As EventArgs)
    '  pass the grid that for exporting ...
    Me.CaseView.GridLines = GridLines.Both
    GridViewExportUtil.Export("Cases.xls", Me.CaseView)
End Sub

End Class

Any help is greatly appreciated, and even more appreciated would be a link to a good resource on getting started with .net applications.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:18:07+00:00Added an answer on May 26, 2026 at 7:18 am

    You need to have a a SqlDataSource somewhere in your page with ID “ByOwner”

    For example:

    <asp:SqlDataSource ID="ByOwner" runat="server" />
    

    Notice that you are declaring your datasource of the GridView to be “ByOwner”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.