Solved

Need access to Dbase3 database

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now