Forum > General
How to open .dbf (Convert from Delphi) <SOLVED>
Jayndel:
The database I am trying to access is actually a dBase3. dbf.
Unfortunately I have never previously used a visual database component, so I am rather lost.
Thank you all for your assistance. While learning a new system at 75 years of age is not so easy, it is reassuring to find there is such an active community willing to assist.
Again, many thanks.
Zath:
Open the table with a spreadsheet such as excel by selecting Open and select .dbf dBase as the file type.
You can then save your data and use Lazarus to create a newer database program.
Jayndel:
Sorry about duplicate post, thought I had posted to incorrect section.
I now find I had mis-named the problem.
What I was trying to do was open a database in what was basically a console app. i.e. without using visual components
I finally sorted the problem..
var
Form1: TForm1;
Dbf1: TDbf;
Dir : String;
n : Integer;
Dbf1:=tDbf.Create(Self);
Dir:=GetCurrentDir;
Dbf1.FilePath := Dir;
Dbf1.TableLevel := 7;
Dbf1.Tablename := 'Games.dbf';
Dbf1.Exclusive := True;
Dbf1.Open;
n:=Dbf1.recordcount; // Proof of Success :D
Dbf1.Close
Many thanks for your help.
Navigation
[0] Message Index
[*] Previous page