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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:33:52+00:00 2026-05-29T07:33:52+00:00

Hi I am having trouble keeping connection with my MongoDB and it ends up

  • 0

Hi I am having trouble keeping connection with my MongoDB and it ends up interrupting my program when it loses connection, how would I go about continuing to print from the last place that I lost connection at, I keep a count of the index but how do I use that count to start from that position in the cursor

using (server.RequestStart(db))
{
    var cursor = col.FindAll();
    foreach (var item in cursor)
    {
        //code here
    }
}
  • 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-29T07:33:53+00:00Added an answer on May 29, 2026 at 7:33 am

    Why are you having trouble keeping your connection to MongoDB open? Are you losing your network connection in the middle of the query? Are you timing out?

    In general the only way to reliably restart a query is if the results are sorted and you use a query on the restart to skip over documents you already processed (in other words, skip over those documents where the sort key is less than or equal to the last document processed).

    You probably don’t need to call RequestStart. The only time you ever need to call RequestStart is if you want to ensure that a sequence of database operations all occur on the same connection (which is only needed in unusual circumstances).

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

Sidebar

Related Questions

I am having trouble keeping the Percona build of MySQL from starting on boot.
I'm having trouble keeping my app responsive to user actions. Therefore, I'd like to
Im having trouble reading from a CSV file final String DELIMITER = ,; Scanner
I am having trouble keeping my first and second rows of my main PdfPTable
I am just starting out with network programming and I am having trouble keeping
I am having trouble keeping game objects inside of a contained space. When they
I am having trouble keeping a ListBox updated with child objects. I'm using two
In a GWT app centered around a canvas, I'm having trouble keeping focus directed
Having trouble keeping expanded groupings expanded when the XtraGrid's datasource is reassigned. BACKGROUND Form
I am having trouble keeping the state of my Mac OS X app (running

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.