home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2001 July
/
PCWorld_2001-07_cd.bin
/
Software
/
Komercni
/
software602
/
cnv_ifp.exe
/
I_CONV.PGM
< prev
next >
Wrap
Text File
|
2001-02-14
|
8KB
|
267 lines
{$$3249892600 . }include
var
conv_dir : string[255]; // Adresß°, v n∞m₧ se majφ data konvertovat
conv_ver : short; // UrΦuje konkrΘtnφ konverzi mezi verzemi
conv_sqlerror : boolean; // Chyba p°i provßd∞nφ SQL p°φkazu
procedure ConvFormOpen;
begin
conv_dir := "";
conv_ver := 0;
Conv_entry.OPEN(nil);
end;
procedure ConvDirSelect;
begin
if Select_Directory(Conv_entry.handle,conv_dir) then
Conv_entry.RESET_VIEW(-1,RESET_CONTROLS);
end;
procedure ConvExecute;
begin
Set_cursor(1);
if conv_dir[StrLength(conv_dir)]<>"\" then StrInsert("\",conv_dir,StrLength(conv_dir)+1);
case conv_ver of
0 : Conv100To101;
1 : Conv101To102;
2 : Conv102To103;
3 : Conv107To110;
end;
Set_cursor(0);
end;
procedure Conv107To110;
var
err : boolean;
filename : string[255];
begin
err := false;
#sqlbegin
CALL Set_sql_option(64,0);
DELETE FROM _107ti_010;
DELETE FROM _107ti_011;
DELETE FROM _107ti_013;
DELETE FROM _107ti_014;
DELETE FROM _107ti_015;
DELETE FROM _107ti_016;
DELETE FROM _107ti_09;
DELETE FROM _107ti_07;
DELETE FROM _107ti_03;
CALL Set_sql_option(64,64);
#sqlend
filename := conv_dir+"Ti_09.tdt";
Set_status_text("Importuji tabulku Ti_09");
err := not Move_data(-1,filename,-1,"_107ti_09",0,11,-1,-1,true);
if not err then begin
filename := conv_dir+"Ti_010.tdt";
Set_status_text("Importuji tabulku Ti_010");
err := not Move_data(-1,filename,-1,"_107ti_010",0,11,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_011.tdt";
Set_status_text("Importuji tabulku Ti_011");
err := not Move_data(-1,filename,-1,"_107ti_011",0,11,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_013.tdt";
Set_status_text("Importuji tabulku Ti_013");
err := not Move_data(-1,filename,-1,"_107ti_013",0,11,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_014.tdt";
Set_status_text("Importuji tabulku Ti_014");
err := not Move_data(-1,filename,-1,"_107ti_014",0,11,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_015.tdt";
Set_status_text("Importuji tabulku Ti_015");
err := not Move_data(-1,filename,-1,"_107ti_015",0,11,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_016.tdt";
Set_status_text("Importuji tabulku Ti_016");
err := not Move_data(-1,filename,-1,"_107ti_016",0,11,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_07.tdt";
Set_status_text("Importuji tabulku Ti_07");
err := not Move_data(-1,filename,-1,"_107ti_07",0,11,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_03.tdt";
Set_status_text("Importuji tabulku Ti_03");
err := not Move_data(-1,filename,-1,"_107ti_03",0,11,-1,-1,true);
end;
if not err then begin
Set_status_text("Provßdφm konverzi. Tato operace m∙₧e trvat velmi dlouho. Prosφm Φekejte...");
#sql SET :>conv_sqlerror=Conv_transfer_107to110;
err := not conv_sqlerror;
end;
if not err then begin
filename := conv_dir+"Ti_032.tdt";
Set_status_text("Exportuji tabulku Ti_033");
err := not Move_data(-1,"_110Ti_032",-1,filename,11,0,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_033.tdt";
Set_status_text("Exportuji tabulku Ti_033");
err := not Move_data(-1,"_110Ti_033",-1,filename,11,0,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_034.tdt";
Set_status_text("Exportuji tabulku Ti_034");
err := not Move_data(-1,"_110Ti_034",-1,filename,11,0,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_035.tdt";
Set_status_text("Exportuji tabulku Ti_035");
err := not Move_data(-1,"_110Ti_035",-1,filename,11,0,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_036.tdt";
Set_status_text("Exportuji tabulku Ti_036");
err := not Move_data(-1,"_110Ti_036",-1,filename,11,0,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_037.tdt";
Set_status_text("Exportuji tabulku Ti_037");
err := not Move_data(-1,"_110Ti_037",-1,filename,11,0,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_038.tdt";
Set_status_text("Exportuji tabulku Ti_038");
err := not Move_data(-1,"_110Ti_038",-1,filename,11,0,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"_export_tables.tdt";
Set_status_text("Exportuji tabulku _export_tables");
err := not Move_data(-1,"_110_export_tables",-1,filename,11,0,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_07.tdt";
Set_status_text("Exportuji tabulku Ti_07");
err := not Move_data(-1,"_110Ti_07",-1,filename,11,0,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_03.tdt";
Set_status_text("Exportuji tabulku Ti_03");
err := not Move_data(-1,"_110Ti_03",-1,filename,11,0,-1,-1,true);
end;
if err then
MessageBox(nil,"Konverze se nezda°ila!","Chyba!",mb_stop+mb_ok)
else
MessageBox(nil,"Konverze provedena.","Informace",mb_info+mb_ok);
end;
procedure Conv101To102;
var
err : boolean;
filename : string[255];
begin
err := false;
#sqlbegin
CALL Set_sql_option(64,0);
DELETE FROM _101ti_04;
CALL Set_sql_option(64,64);
#sqlend
filename := conv_dir+"Ti_04.tdt";
Set_status_text("Importuji tabulku Ti_04");
err := not Move_data(-1,filename,-1,"_101ti_04",0,11,-1,-1,true);
if not err then begin
Set_status_text("Provßdφm konverzi. Prosφm Φekejte...");
#sql SET :>conv_sqlerror=Conv_transfer_101to102;
err := not conv_sqlerror;
end;
if not err then begin
filename := conv_dir+"Ti_04.tdt";
Set_status_text("Exportuji tabulku Ti_04");
err := not Move_data(-1,"_102Ti_04",-1,filename,11,0,-1,-1,true);
end;
if err then
MessageBox(nil,"Konverze se nezda°ila!","Chyba!",mb_stop+mb_ok)
else
MessageBox(nil,"Konverze provedena.","Informace",mb_info+mb_ok);
end;
procedure Conv102To103;
var
err : boolean;
filename : string[255];
begin
err := false;
#sqlbegin
CALL Set_sql_option(64,0);
DELETE FROM _102ti_03;
CALL Set_sql_option(64,64);
#sqlend
filename := conv_dir+"Ti_03.tdt";
Set_status_text("Importuji tabulku Ti_03");
err := not Move_data(-1,filename,-1,"_102ti_03",0,11,-1,-1,true);
if not err then begin
Set_status_text("Provßdφm konverzi. Prosφm Φekejte...");
#sql SET :>conv_sqlerror=Conv_transfer_102to103;
err := not conv_sqlerror;
end;
if not err then begin
filename := conv_dir+"Ti_03.tdt";
Set_status_text("Exportuji tabulku Ti_03");
err := not Move_data(-1,"_102Ti_03",-1,filename,11,0,-1,-1,true);
end;
if not err then begin
filename := conv_dir+"Ti_031.tdt";
Set_status_text("Exportuji tabulku Ti_031");
err := not Move_data(-1,"_103Ti_031",-1,filename,11,0,-1,-1,true);
end;
if err then
MessageBox(nil,"Konverze se nezda°ila!","Chyba!",mb_stop+mb_ok)
else
MessageBox(nil,"Konverze provedena.","Informace",mb_info+mb_ok);
end;
procedure Conv100To101;
var
err : boolean;
filename : string[255];
begin
err := false;
#sqlbegin
CALL Set_sql_option(64,0);
DELETE FROM _101_config_tobjects;
CALL Set_sql_option(64,64);
#sqlend
if not err then begin
filename := conv_dir+"_config_tobjects.tdt";
Set_status_text("Exportuji tabulku _config_tobjects");
err := not Move_data(-1,"_101_config_tobjects",-1,filename,11,0,-1,-1,true);
end;
if err then
MessageBox(nil,"Konverze se nezda°ila!","Chyba!",mb_stop+mb_ok)
else
MessageBox(nil,"Konverze provedena.","Informace",mb_info+mb_ok);
end;