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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:49:03+00:00 2026-06-14T01:49:03+00:00

I got this error when I am trying the below code IEnumerable<DataRow> projjType =

  • 0

I got this error when I am trying the below code

IEnumerable<DataRow> projjType = from projT in dtProjList.AsEnumerable()
                                 where projT.Field<int?>("ProjectId") == projId && 
                                 projT.Field<int?>("FilterId") == 1 
                                 select projT;

and the stack trace of error is

at System.Data.DataRowExtensions.UnboxT`1.NullableField[TElem](Object value)
   at System.Data.DataRowExtensions.Field[T](DataRow row, String columnName)
   at Folder.Projects.<>c__DisplayClass28.<repProjectList_ItemDataBound>b__1e(DataRow projT) in D:\Folder\Project.aspx.cs:line 1061
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.SystemCore_EnumerableDebugView`1.get_Items()

where the dtProjList is DataTable,and Table Structure is as follows,

ProjectId (int)
ProjectName (string)
ProjectThumb (string)
FilterTypeId (int)
FilterId (int)
FilterType (string)

all are not null values.Can anybody please help me out.

thanks in advance.

Update :: This is onlyrecord in my table,is the error because of the single record ??

ProjectId   ProjectName ProjectThumb    FilterTypeId    FilterId    FilterType
   1    Datamaster  small_14.jpg         1             1               Final
  • 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-06-14T01:49:04+00:00Added an answer on June 14, 2026 at 1:49 am

    If all fields are not null, then cast fields to int instead of nullable int?

    var projjType = from projT in dtProjList.AsEnumerable()
                    where projT.Field<int>("ProjectId") == projId && 
                          projT.Field<int>("FilterId") == 1 
                    select projT;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got this error while trying to compile the below code. I would like
i got this error while trying to rebind a grid: ( Parent page (
Got this error message while trying to load view: The model item passed into
Got this error message while trying to configure an entitydatasource in the designer: My
I was trying to run a request factory example, but, I got this error
iam trying to run an application visual studio 2008.. got this error.. help me
I was trying to execute the below code in my javascript and got some
Got this error on a big $_GET query in size ~9 000 symbols (they
I got this error when I was installing the SugarCRM on the server: Fatal
i got this error in the logcat 06-21 11:58:27.275: E/AndroidRuntime(404): java.lang.RuntimeException: Unable to start

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.