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

  • Home
  • SEARCH
  • 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 103625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:09:12+00:00 2026-05-11T01:09:12+00:00

I need to open foxpro free tables in vb.net using the oledb connection. But…

  • 0

I need to open foxpro free tables in vb.net using the oledb connection.

But… I only need to get the column names. I don’t really need to ‘select’ anything. I am trying to dynamically browse through all our free tables and set up a listing of every column from every file and xref that to another free table that contains a description of each column.

I have a working model now, but it requires that I do…

SELECT TOP 1 FROM 'File' ORDER BY 1 

But on the largest table, it takes over two minutes just to read in the first record and there are over 250 tables. Overall, it takes between 15 and 20 minutes.

Or, is there another way to only get the first record of the table without using ‘ORDER BY’?

Here’s what I have so far. ‘File’ is passed in as a parameter.
It would contain info like ‘C:\data\table1.dbf’

Dim filePath As String filePath = IO.Path.GetDirectoryName(file) myOledbConnection = New OleDbConnection('Provider=VFPOLEDB.1;Data Source=' & filePath & ';Collating Sequence=MACHINE') myOledbCommand = New OleDbCommand myOledbDataAdapter = New OleDbDataAdapter Dim fields, from, order As String  fields = 'select top 1 *' from = ' from ' & file order = ' order by 1'  myOledbCommand.CommandText = fields & from & order myOledbCommand.Connection = myOledbConnection  myOledbDataAdapter.SelectCommand = myOledbCommand myOledbDataAdapter.Fill(dt)                      

I then take the datatable (dt) and loop through to get the column information.

I would like it to be as quick as Visual Studio is when I create a dataset and load all tables from the directory through the wizard. It is able to very quickly find all the column information without reading in the data from the table.

Let me know if you need more information.

Thanks.

  • 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. 2026-05-11T01:09:13+00:00Added an answer on May 11, 2026 at 1:09 am

    Why do you need to get any records at all? You should be able to say:

    SELECT * FROM 'File' where 1 = 0 

    This will give you an empty result set, will also give you metadata on the projection returned.

    You might also want to look into the GetOleDbSchemaTable method on the OleDbConnection class, as it will allow you to get information about the schema of the database without having to perform a query.

    You can also use the Microsoft ADO Extensions for Data Definition Language and Security through COM interop (mxADOX.dll) to get the schema information as well.

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

Sidebar

Ask A Question

Stats

  • Questions 130k
  • Answers 131k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer As I can see from this ExtJS forum post they… May 12, 2026 at 6:10 am
  • Editorial Team
    Editorial Team added an answer Don't create a pointer to a vector. Just do vector<OutputStore>… May 12, 2026 at 6:10 am
  • Editorial Team
    Editorial Team added an answer Use the propertyregex task from Ant Contrib. I think you… May 12, 2026 at 6:10 am

Related Questions

I need to open foxpro free tables in vb.net using the oledb connection. But...
I've got a bunch of FoxPro (VFP9) DBF files on my Ubuntu system, is
I need to open popup window in my flex / air application that will
I need to open a new window from code-behind on post-back if a specific
I need to open an external window from a Java applet. How can I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.