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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:56:27+00:00 2026-05-28T05:56:27+00:00

I currently have the :below: code for generating a list of all current ‘rides’

  • 0

I currently have the :below: code for generating a list of all current ‘rides’ in an sql db table.. However, it seems that although there is data in the table, I am not able to access it. Am I missing an initialization step? Other thoughts?

using (RamRideOpsEntities myEntities = new RamRideOpsEntities())
        {
            var adminOptions = (from a in myEntities.AdminOptions
                                select new { a.ValidDate1, a.ValidDate2 }).First();

            var allRides = (from r in myEntities.Rides
                         where (r.TimeOfCall == adminOptions.ValidDate1 ||
                                r.TimeOfCall == adminOptions.ValidDate2)
                         orderby r.TimeOfCall descending
                         select r).ToList();

            TextBox1.Text = allRides[0].Name; // <- Seems there are no existing objects as rides[0] is out of bounds
        }
  • 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-28T05:56:28+00:00Added an answer on May 28, 2026 at 5:56 am

    Have you checked the adminOptions variable to confirm whether or not it contains what you intend for it to contain?

    The ValidDate1 and ValidDate2 properties of the adminOptions variable are the only conditions of the allRides query that are external to the Rides table, so my guess is that the allRides query might be OK; however, there may be an issue with the adminOptions query.

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

Sidebar

Related Questions

I have a python psp page code is shown below. Currently it only prints
I currently have the below function within my code:- def openFiles(): file1 = open('file1.txt',
I currently have the code below it works fine up until I actually try
Currently I have the code below to put the data in a Hash. My
Currently I have the code below to add my view to a navigation controller.
I currently have the below code to fetch data from my Entity framework model.
I currently have the below code, but obviously I am not that skilled on
I currently have the code below, to replace a characters in a string but
I currently have a workable Django admin on the left mockup below but want
I have a simple bit of jQuery which displays the row below the current

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.