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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:52:54+00:00 2026-06-03T19:52:54+00:00

I am working on the software for an instrument that logs batch results into

  • 0

I am working on the software for an instrument that logs batch results into single DBase 4 (*.dbf) disk files in a folder. In preparation for adding new logging analysis capability which is planned to work with multiple of these DBF files, I am changing the existing simple BDE TTable and CreateTable which reopen and create a new DBF file respectively into use of the Delphi ADO components.

Using other suggestion here on SO I have successfuly created a test application which opens an existing DBF file using the following core code using a TAdoDataSet and a TAdoConnection:

ADODataSet1.DisableControls;
try
  S := ExtractFileDir( ParamStr(0) ); //set the dbf folder location here
  ADOConnection1.LoginPrompt:=false;
  ADOConnection1.ConnectionString:=Format('Provider=Microsoft.JET.OLEDB.4.0;Data Source=%s;Extended  Properties=dBase IV;',[S]);
  ADOConnection1.Connected:=True;
  ADODataSet1.CommandText:='Select * from test.dbf'; //The SQL query uses the name of the dbf file
  ADODataSet1.Open;
finally
  AdoDataSet1.EnableControls;
end;

This works fine but before my DBF is used for the first time I will also need to creat an empty DBF file ready to add my log records. I could do this by opening an exising ’empty’ DBF file each time but I was hoping that there was an SQL? way of creating my file if I have already created and defined my fields (which is easy for me). I tried this with a TAdoTable where I could created the required fields but I could not find any examples of how to get this table structure out onto disk when nothing was already there, mainly because there are so many ADO examples but almost always working on existing data tables.

Can anyone help me create a sample DFB table file with a couple of fields using ADO components please? I’m sure I can then build on that.

Many 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. Editorial Team
    Editorial Team
    2026-06-03T19:52:58+00:00Added an answer on June 3, 2026 at 7:52 pm

    Use TADOCommand and execute Create Table SQL, for example something like this :

    Create Table Test (TestField1 char(64), TestField2 integer)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a Software Project that needs to be translated into 30
We have situation where say we have four engineers that are working on software
I'm working on some software to manage a device that communicates with a remote
A software application that I'm working on needs to be able to assign tasks
I'm working on a piece of software that would work well with an iTunes
First question. Be gentle. I'm working on software that tracks technicians' time spent working
I'm working on a software that does extensive queries to a database which is
I am working on some software that does a sparse matrix-vector multiply. The matrix
I'm working on software that has been developed to support two SQL Server versions.
I am working on some software that should be used for a special type

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.