Solved

Need access to Dbase3 database

Posted on 2001-08-07
2
403 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month8 days, 11 hours left to enroll

615 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