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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:03:47+00:00 2026-05-26T14:03:47+00:00

This article is really great and awesome. This is from the topic ASP.NET MVC

  • 0

This article is really great and awesome. This is from the topic “ASP.NET MVC 2.0 Implementation of searching in jqgrid” – ASP.NET MVC 2.0 Implementation of searching in jqgrid.

But right now I was facing searching problem when I added a field with small integer data type. The field added with data type of small integer will serve as Status.
Lets say the value one(1) is for Active and value two(2) is for Inactive.

When I type 1 or 2 from the text box it was throwing an error of

System.Data.Entity: The argument types ‘Edm.Int16’ and ‘Edm.String’ are incompatible for this operation. Near equals expression, line 6, column 12.

Thank you in advance.

  • 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-26T14:03:48+00:00Added an answer on May 26, 2026 at 2:03 pm

    I am glad that my old answer was helpful for you. I suppose you have problem near the line

    // TODO: Extend to other data types
    

    In the code which I included in the answer I shown that propertyInfo.PropertyType.FullName hold the information about the datatype of the entity’s property. In the code I used only two types: string and 32-bit integer. In case of 32-bit integers I made the corresponding data parsing with respect of Int32.Parse:

    String.Compare (propertyInfo.PropertyType.FullName,
                    "System.Int32", StringComparison.Ordinal) == 0 ?
        new ObjectParameter ("p" + iParam, Int32.Parse(rule.data)
    

    You should replace ” ? : ” operator with case where you test propertyInfo.PropertyType.FullName for more data types. For example in case of smallint SQL type you should use System.Int16, in case of tinyint it should be System.Byte, The sbyte SQL datatype corresponds to System.SByte and so on. If you would use as the second parameter of ObjectParameter correct datatype all should work correctly

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

Sidebar

Related Questions

I'm reading an article from this website , but when i run the code
I've read this article, but it's for Rails 1.x. I'd really like to create
After reading this article on thedailywtf.com, I'm not sure that I really got the
This article from Microsoft details how to implement transport security with an anonymous client
I've read a few SO articles about whether or not ASP.NET MVC is worth
There's some really great code for a glass button here: http://www.lukesw.net/articles/GlassButton.aspx The only trouble
I don't know if this question really suits here, but we'll see :) For
This article gives a good overview on why structured exception handling is bad. Is
This article describes a way, in C#, to allow the addition of arbitrary value
This article here suggests to use -XX:+UseParNewGC To enable a parallel young generation GC

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.