home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
db_dbug2.zip
/
INSERT.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1987-02-18
|
1KB
|
31 lines
type str_66 = string[66];
var file_in: file of char;
i: integer;
dbf_name, ndx_name: str_66;
const blanks = ' ';
function exist(file_name: str_66): boolean;
var fil: file;
begin
assign(fil,file_name); {$I-} reset(fil); close(fil); {$I+} exist:=(ioresult=0);
end;
begin
if paramcount=2 then begin
ndx_name:=paramstr(1)+'.ndx'; if exist(ndx_name) then begin
assign(file_in,ndx_name); reset(file_in); seek(file_in,496);
dbf_name:=paramstr(2)+'.DBF'+chr(0)+copy(blanks,1,11-length(paramstr(2)));
for i:=1 to 16 do write(file_in,dbf_name[i]);
close(file_in);
end;
end else begin
writeln('INSERT.COM puts the name of the appropriate .DBF file into the');
writeln('designated .NDX header (dBASE III files) at 02F0h. The syntax is:');
writeln('INSERT ndxfilename dbffilename ; without extensions.');
writeln('The associated file is PICKIT.COM.');
end;
end.