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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:37:27+00:00 2026-06-08T19:37:27+00:00

I have visual fox pro database with thousands of rows. I am using oledb

  • 0

I have visual fox pro database with thousands of rows. I am using oledb to fetch data from fox pro and export(after doing some calculation and fomatting) it to sql server.I have used dataset to populate 2-3 datatable(related table) at a time.

First problem is that the memory use is very high because the dataset are huge.I want to reduce memory footprint.Any suggestion for this.

So i have decided to fetch few rows at a time.How do i fetch rows using oledb command so that i can fetch for eg 1-20 and then 20-40 etc

  • 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-08T19:37:29+00:00Added an answer on June 8, 2026 at 7:37 pm

    Based on all the comments and HatSoft’s code here is what I think you are looking for. This is pseudo-code, whcih means it will not compile but should give you a good idea of where to go from here.

    int NumberOfRecordsToRetrieve = 10000;
    int StartRecordNumber = 1;
    bool EndOfFile = false;
    
     string queryString = "SELECT OrderID, CustomerID FROM Orders WHERE RECNO() BETWEEN @StartRecordNumber AND @EndRecordNumber"; 
    
    While (!EndOfFile)
    {
         using (OleDbConnection connection = new OleDbConnection(connectionString)) 
         { 
             OleDbCommand command = new OleDbCommand(queryString, connection); 
             command.Parameters.Add(new OleDbParameter("@StartRecordNumber", StartRecordNumber)); 
             command.Parameters.Add(new OleDbParameter("@EndRecordNumber", StartRecordNumber + NumberOfRecordsToRetrieve)); 
    
             connection.Open(); 
             OleDbDataReader reader = command.ExecuteReader(); 
    
              EndOfFile = true;
              while (reader.Read()) 
              { 
                   EndOfFile = false
    
                   //Retrieve records here and do whatever process you wish to do
               } 
               reader.Close(); 
    
               StartRecordNumber += NumberOfRecordsToRetrieve;
         } 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Visual Fox Pro Database (.DCX file with associated .DBF files) that
I have an XML string which is output from a Visual Fox Pro based
I have Visual 2010, I am trying to generate dal from my database. I
I have Visual Studio 2005 Team Edition for DB Professionals. After starting Data -->
i have to extract some data from a foxpro database. I found a sample
I'm using the CDO.Message class to create and send an email from a Visual
I have Visual Studio 2010 Ultimate and C# and am doing unit tests and
I have to convert .DBF and .FPT files from Visual FoxPro to MySQL. Right
I have Visual Studio 2008 running from Windows XP. Our server is Windows 2003
I want to create a CSV file from our Sage Abra Suite database using

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.