Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need access to Dbase3 database

Posted on 2001-08-07
2
Medium Priority
?
405 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 150 total points
ID: 6363650
There are Databases interface that support this database structure

List www.advantageDatabase.com

or

www.apollodatabase.com
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

662 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