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 900177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:20:28+00:00 2026-05-15T15:20:28+00:00

I am using VB .Net for this, so I don’t have access to var

  • 0

I am using VB .Net for this, so I don’t have access to var or this would be a simple matter.

Right now my query is as follows

Dim errors As IOrderedQueryable(Of IGrouping(Of String, RSError)) = (From e In db.RSErrors 
                                                                     Where e.UserID = "msarchet" 
                                                                     Group e By e.Type Into t = Group).AsEnumerable

So I used this query in LinqPad to help me determine what the object would look like. I got back a IOrderQueryable(Of RSError) which then contained a IGrouping(Of String, RSError) for each grouped collection of objects returned by the query.

However I ended up with the current object type of errors as IOrderedQueryable(Of IGrouping(Of String, RSError)) because of the cast error I am getting in VS.

Unable to cast object of type ‘System.Data.Linq.DataQuery1[VB$AnonymousType_12[System.String,System.Collections.Generic.IEnumerable1[RSSAdmin2.RSError]]]' to type 'System.Linq.IOrderedQueryable1[System.Linq.IGrouping2[System.String,RSSAdmin2.RSError]]'.

I’m not sure how to get rid of the VB$AnonymousType_1 Part of the returned object.

Am I even on the right track here or am I missing something completely?

  • 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-15T15:20:29+00:00Added an answer on May 15, 2026 at 3:20 pm

    Can you try the following

    Dim errors = (From e In db.RSErrors 
                  Where e.UserID = "msarchet" 
                  Group e By e.Type Into t = Group).AsEnumerable
    

    Doing it this way basically sets it to

    Dim errors As Object [Whatever the expression returns]

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

Sidebar

Related Questions

I am using .NET 3.5 C#. I have a simple connection class with only
I have been dealing with this for at least two days now. I don't
Using NHibernate with ASP.NET 4. I have had no issues retrieving objects, but I've
I don't know whether this is the right forum. Anyway here is the question.
I am using .Net (C#, WinForms, Linq to SQL, SQL Server 2008) to develop
I am trying to update a set of queries using .NET's DataAdapter. Here's a
I have this: string a = a+a; SqlCommand q = new SqlCommand(SELECT * FROM
C# or VB.NET suggestion is welcome. I have computers joined to a domain. I'm
I know this could be a subjective question, but I want to know your
I am creating a server to monitor the online presence of clients on a

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.