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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:41:22+00:00 2026-06-01T18:41:22+00:00

I am using a DB2 provider to hit a database on an AiX Server.

  • 0

I am using a DB2 provider to hit a database on an AiX Server. Here is the LINQ statement I am using to that returns an anonymous type.

var docs = (from a in WIP
            where (!dtFrom.HasValue && !dtTo.HasValue) || (a.QBE_DT.Value >= dtFrom.Value && a.QBE_DT.Value <= dtTo.Value) && a.STATUSCODE != "X" && a.KEY1 != "CABS" && a.KEY1 != "BPI"
            group a by new
            {
                a.BATCH_ID,
                a.POLICY_NUM,
                a.QBE_DT
            } into grp
            select new
            {
                BatchId = grp.Key.BATCH_ID.Trim(),
                BatchGroup = grp
            }).ToList();

The return from this is causing the Provider to timeout, throwing a Process has been canceled due to an interrupt error. My thought is if I “Take” a subset of the recordset, this issue will go away. The issue I have, is I cannot simply add a Take(100) before the ToList(), because it throws:

SQL0418N A statement contains a use of an untyped parameter marker, the DEFAULT keyword, or a null value that is not valid. SQLSTATE=42610

I wish I was able to see the SQL generated to make sure it is the right syntax, but I don’t know how to in this situation. Is there an elegant way to get the first X Elements from above LINQ statement?

  • 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-01T18:41:23+00:00Added an answer on June 1, 2026 at 6:41 pm

    The workaround for this was to do the grouping and filtering in memory and getting a larger amount of data back from the source

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

Sidebar

Related Questions

I would like to connect to a DB2 database, specifically an iSeries version, using
We're using DB2 9.1 on Linux and SQL Server 2005, and the IBM db2
I am currently using DB2 . I do not know much about load statement.
I have the same issue using hibernate against DB2 and MySQL. Here is a
I create a custom schema in my DB2 database using the following command: db2
I need to create a linked server to a DB2 database on a mainframe.
how to insert database(DB2) tuples as XML elements in XML file using java? Is
As a developer using DB2 for the first time, I'm not familiar with what
I am using db2 and I want to find tables, having a column named
How do I insert to an identity column using sequences in DB2?

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.