home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
PASCAL
/
DBLK2.ZIP
/
DBLKTEST.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-09-30
|
1KB
|
38 lines
program dblktest;
{ just a test program to read a Dbase III + file, show the structure,
and optionally list the records in SDF format.
}
uses
crt,dblook;
var
infile :string;
i :integer;
ch :char;
begin { main }
clrscr;
writeln('Utility to read Dbase III+ .DBF files. ',version_no);
writeln;
write('Enter Dbase file to read (END to exit) ');
readln(infile);
for i := 1 to length(infile) do infile[i] := upcase(infile[i]);
if (infile <> 'END') then
begin
if(dbuse(infile) = DBOK) then { open file, read the header of the database file }
begin
showstruc; { show us what you have found }
write('Read and display the data (Y/N) ');
readln(ch);
ch := upcase(ch);
if ch = 'Y' then
list_all_recs;
if(dbclose <> DBOK) then
writeln('Unable to close ',infile);
end
else
writeln('Unable to open Dbase file ',infile);
end;
writeln('End of DBlook.');
end.