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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:18:41+00:00 2026-05-30T21:18:41+00:00

I am working on a Windows Phone 7 application with an SQLite Local Database

  • 0

I am working on a Windows Phone 7 application with an SQLite Local Database and I’ve stuck with it a bit.

I have several classes defined, each of them has a mapping set up and I wish to retrieve a list with some filterings. I have found many examples how to check for equal values but none for not-equal checks.

CSParameterCollection parameters = new CSParameterCollection();
        parameters.Add("@CurrentDate", currentDate);
        parameters.Add("@DirectionId", intVisszaut);
CSList<Trip> RouteTrips = Route.Trips.FilteredBy("Services.StartDate <= @CurrentDate and Services.EndDate >= @CurrentDate and Services." + DayOfWeek.ToString() + " = 1 and DirectionId = @DirectionId", parameters);

This filter works without any problems, but when I update it with the following, it fails:

(Services.CalendarDates.Date != @CurrentDate and Services.CalendarDates.Date.ExceptionType != 2)

CSParameterCollection parameters = new CSParameterCollection();
        parameters.Add("@CurrentDate", currentDate);
        parameters.Add("@DirectionId", intVisszaut);
CSList<Trip> RouteTrips = Route.Trips.FilteredBy("(Services.CalendarDates.Date != @CurrentDate and Services.CalendarDates.Date.ExceptionType != 2) and Services.StartDate <= @CurrentDate and Services.EndDate >= @CurrentDate and Services." + DayOfWeek.ToString() + " = 1 and DirectionId = @DirectionId", parameters);

Error code is: A first chance exception of type ‘System.InvalidCastException’ occurred in Vici.CoolStorage.WP7.dll

Services is a OneToOne, Services.CalendarDates is a OneToMany mapping. Do I use too many filter values or I do something wrong? It doesn’t work by using <> either.

  • 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-30T21:18:41+00:00Added an answer on May 30, 2026 at 9:18 pm

    What is Services.CalendarDates.Date.ExceptionType – are you sure that can be compared to a numeric like 2?

    To debug this:

    • try removing each part of your filter expression in order to identify which part is causing the failure
    • try linking to the CoolStorage source code – then you can see exactly what is failing (although this may be quite deep down in their stack and may feel a bit unreadable)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working at Windows Phone application these days and have faced the problem with
I am working on Windows Phone 7.1 application. I have a UserControl which has
I am working on an application for windows phone 7. I have a to
I'm working on a Windows Phone application that displays an audioStream (as radio) but
I have been working fine with MVVM Light on a silverlight 4 Windows Phone
Presently I'm working on a Windows Phone application that will work in both online
I am working on an application in windows phone 7.And I want to whether
I am working on a Windows phone 7 application. I am using this implementation
I am working on a windows phone 7 application that uses the FluidMoveBehavior in
I am working on a Silverlight based Windows Phone application that only supports landscape

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.