Solved

Need access to Dbase3 database

Posted on 2001-08-07
2
402 Views
Last Modified: 2010-04-06
Ok. I'm rather new at Delphi, and COMPLETELY new to programming with databases. Therefore please bear with me if this seems simple to you.

I have a program that needs to access data elements from within a dbase3 compatable DBF/NDX set. Someone mentioned using TTable, so I looked into it. TTable sounds like it will work, but I cannot figure it out. Up till now the only time I was reading from anything besides a flat file (file of records) was when I was using a 3rd party database API for their format.

Basically, here's what needs to happen:

Step 1) Open Database file
Step 2) Find All records matching a criteria (in this case, all records with the same SOC_SEC field)
step 3) read the data from that database into a structure defined in memory.
step 4) fill in template with data from database file, and write to disk.
step 5) Repeat while there are records with PRINTED=N

I can do most of that myself (template included) but I cannot figure out how to obtain data from a TTable, or even how to correctly CONFIGURE the ttable so it will open the database file.

Thanks!
Dan
0
Comment
Question by:DanEgli
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6362708
well,
first you must forget the ndx-indexes,
they are clipper-specific and not supported by the bde,
if you use the bde

if you use the bde, the first configure an alias to your dbase-table-dirrctory with the bde-admin

in delphi just assign a ttable to this alias (property databasename) and select you table in the property tablename.

1. open the table
2. use a filter 'SOC_SEC = '+quotedStr('AStringValue')
and set filtered to true
3. table1.first
   while not Table1.eof do
   begin
     //do your recordfilling
     TheRecord.TheAttribut := table1.fieldbyname('TheFieldName').AsSomeWhatTyp;
     //...more fields
     //do somewhat with your recordstructure
     table1.next;
   end;
4. see 3
5. ?

meikl ;-)
0
 

Accepted Solution

by:
asi earned 50 total points
ID: 6363650
There are Databases interface that support this database structure

List www.advantageDatabase.com

or

www.apollodatabase.com
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question