if not DirectoryExists('C:\XXXXX') then ForceDirectories('C:\XXXXX'); if not FileExists('C:\XXXXX\DataIndex.db') then begin Table3 := Tquery.create(self); with Table3 do begin with sql do begin clear; add('create table "'+ 'C:\XXXXX\DataIndex.db"'); add('(CZRsj char(14),'); // 加入时间 add('SHbh char(24),'); // 编号 add('QK char(24),'); // 欠款 add('CZRID Char(10),' ); // 操作人编号 Add('FIndex int)'); end; execsql; sql.clear; sql.add('create index CZRID on "C:\XXXXX\DataIndex.db" (CZRID)'); execsql; end; Table3.CLose; Table3.Free; end;
ForceDirectories('C:\XXXXX'); if not FileExists('C:\XXXXX\DataIndex.db') then
begin
Table3 := Tquery.create(self);
with Table3 do
begin
with sql do
begin
clear;
add('create table "'+ 'C:\XXXXX\DataIndex.db"');
add('(CZRsj char(14),'); // 加入时间
add('SHbh char(24),'); // 编号
add('QK char(24),'); // 欠款
add('CZRID Char(10),' ); // 操作人编号
Add('FIndex int)');
end;
execsql;
sql.clear;
sql.add('create index CZRID on "C:\XXXXX\DataIndex.db" (CZRID)');
execsql;
end;
Table3.CLose;
Table3.Free;
end;