代码拉取完成,页面将自动刷新
unit U_Scheme;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, CheckLst, ComCtrls, Buttons, Spin, Mask, ToolEdit,Alarm;
type
Tfrm_Scheme = class(TForm)
GroupBox3: TGroupBox;
export: TSpeedButton;
Label8: TLabel;
SP_SaveScheme: TSpeedButton;
Label7: TLabel;
Label9: TLabel;
Label10: TLabel;
autoBack: TSpeedButton;
lastTime: TLabel;
runCount: TLabel;
ComboBox11: TComboBox;
DateTimePicker1: TDateTimePicker;
ComboBox2: TComboBox;
DateTimePicker2: TDateTimePicker;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
Label6: TLabel;
Edit5: TEdit;
RadioGroup1: TRadioGroup;
CK_IsZip: TCheckBox;
GroupBox4: TGroupBox;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
ftp_host: TEdit;
ftp_use: TEdit;
ftp_pass: TEdit;
ftp_port: TEdit;
ftp_dmp: TCheckBox;
ftp_rar: TCheckBox;
Ed_Name: TEdit;
SpeedButton1: TSpeedButton;
Label18: TLabel;
ftp_dir: TEdit;
La_zippassword: TLabel;
Ed_zippassword: TEdit;
Panel1: TPanel;
ME_TableName: TMemo;
Panel2: TPanel;
seleB: TSpeedButton;
SP_ClearTableName: TSpeedButton;
Label20: TLabel;
Panel3: TPanel;
CL_OraUserList: TCheckListBox;
Panel4: TPanel;
Label5: TLabel;
SB_OraUser: TSpeedButton;
Panel5: TPanel;
CL_EXPParam: TCheckListBox;
Panel6: TPanel;
Label2: TLabel;
Label3: TLabel;
Label16: TLabel;
Label4: TLabel;
Label1: TLabel;
SB_TestConn: TSpeedButton;
Label15: TLabel;
Label17: TLabel;
ED_User: TEdit;
ED_Pass: TEdit;
ED_ArcDir1: TEdit;
ED_Server: TEdit;
Ed_query: TEdit;
se_buffer: TSpinEdit;
se_filesize: TSpinEdit;
Label19: TLabel;
CheckBox1: TCheckBox;
CK_IsShow: TCheckBox;
ED_Server2: TEdit;
CK_Passive: TCheckBox;
Ed_OracleHome: TDirectoryEdit;
ED_ArcDir: TDirectoryEdit;
Splitter1: TSplitter;
Splitter2: TSplitter;
Label21: TLabel;
CB_dbtype: TComboBox;
Label22: TLabel;
Cb_inctype: TComboBox;
SpeedButton2: TSpeedButton;
ck_ftpUtf8: TCheckBox;
ck_ftpUTC: TCheckBox;
Panel7: TPanel;
CK_IsContinue: TCheckBox;
CK_IsDelZip: TCheckBox;
CK_LeveLast: TCheckBox;
La_HoldDays: TLabel;
Ed_HoldDays: TEdit;
Label23: TLabel;
procedure RadioGroup1Click(Sender: TObject);
procedure SB_TestConnClick(Sender: TObject);
procedure SB_OraUserClick(Sender: TObject);
procedure CL_OraUserListClick(Sender: TObject);
procedure CL_OraUserListClickCheck(Sender: TObject);
procedure SP_ClearTableNameClick(Sender: TObject);
procedure seleBClick(Sender: TObject);
procedure exportClick(Sender: TObject);
procedure SP_SaveSchemeClick(Sender: TObject);
procedure autoBackClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure CK_IsZipClick(Sender: TObject);
procedure CB_dbtypeChange(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
private
{ Private declarations }
CHECKCLICK:Boolean;
index:Integer;
ParStringList:TStrings;
State:Integer;
OriState:Integer;
procedure GetOraUsers;
procedure SetExpParamCurrent(value: TStrings);
procedure ShowFullDatabase(b: boolean);
function getTempParam: String;
function SetParFile(name: String):String;
procedure LoadParFile;
procedure SetCurrentScheme;
function SaveCurrentScheme(name: String): integer;
procedure SaveTempScheme;
procedure setDbType(index: Integer);
public
{ Public declarations }
procedure WriteTheScheme(name: String; var sch: array of String);
procedure ShowLastTime;
function FrmShow(state1,inIndex:Integer):Integer;
end;
var
frm_Scheme: Tfrm_Scheme;
implementation
uses U_COMMFUNC,U_main, U_des;
{$R *.DFM}
function Tfrm_Scheme.FrmShow(state1,inIndex:Integer):Integer;
begin
GetCurrentScheme('SCHEME'+IntToStr(inIndex+1));
frm_Scheme:= Tfrm_Scheme.Create(Application);
frm_Scheme.SP_SaveScheme.Visible:=state1>0;
frm_Scheme.OriState:=state1;
frm_Scheme.index:=inIndex;
frm_Scheme.ShowModal;
Result:=frm_Scheme.State;
frm_Scheme.ParStringList.Destroy;
frm_Scheme.Destroy;
end;
procedure Tfrm_Scheme.LoadParFile;
begin
try
ParStringList.Clear;
ParStringList.LoadFromFile(GetParFileName(''));
except end;
end;
procedure Tfrm_Scheme.RadioGroup1Click(Sender: TObject);
begin
CK_LeveLast.Enabled:=(RadioGroup1.ItemIndex>2) AND (RadioGroup1.ItemIndex<5);
La_HoldDays.Enabled := RadioGroup1.ItemIndex=6;
Ed_HoldDays.Enabled := La_HoldDays.Enabled;
end;
procedure Tfrm_Scheme.SB_TestConnClick(Sender: TObject);
var
i:Integer;
begin
//xxy 2021-12-28 都增加数据库类型
i := CB_dbtype.ItemIndex;
SetOracleEnv(Ed_OracleHome.Text,CheckBox1.Checked);//2012-09-16
if TestConntion(ED_User.Text,ED_Pass.Text,ED_Server.Text,Ed_OracleHome.Text,i) then
Begin
Application.MessageBox('数据库连接正常!','提示',0);
End Else
Application.MessageBox('不能获得数据库连接,请重新设置!','提示',0);
end;
procedure Tfrm_Scheme.SB_OraUserClick(Sender: TObject);
begin
setDatabaseParam(Ed_OracleHome.Text,ED_Server2.Text,CB_dbtype.ItemIndex);
GetOraUsers;
end;
procedure Tfrm_Scheme.CL_OraUserListClick(Sender: TObject);
begin
if not CHECKCLICK Then
Begin
SETSELECT(Sender);
CL_OraUserListClickCheck(Sender);
End;
CHECKCLICK:=false;
end;
procedure Tfrm_Scheme.CL_OraUserListClickCheck(Sender: TObject);
begin
CHECKCLICK:=TRUE;
If (Sender as TCheckListBox).Checked[0] Then
Begin
ME_TableName.Enabled:=false;
ME_TableName.Color:=clBtnFace;
End Else Begin
ME_TableName.Enabled:=true;
ME_TableName.Color:=clWindow;
End;
seleB.Enabled:=ME_TableName.Enabled;
end;
procedure Tfrm_Scheme.ShowLastTime;//(ltime,count:String);
begin
lastTime.Caption:='上次:'+Current_Scheme_Values[18];
runCount.Caption:='次数:'+Current_Scheme_Values[19];
end;
procedure Tfrm_Scheme.SetCurrentScheme;
var
d:String;
begin
Ed_Name.Text:=Current_Scheme_Values[0];
DateTimePicker1.Time:=StrToTime(Current_Scheme_Values[2]);
DateTimePicker2.Date:=StrToDate(Current_Scheme_Values[3]);
ComboBox2.ItemIndex:=StrToInt(Current_Scheme_Values[4]);
ED_User.Text:=Current_Scheme_Values[5];
ED_Pass.Text:=decode_string(Current_Scheme_Values[6]);
ED_Server.Text:=Current_Scheme_Values[7];
ED_ArcDir.Text:=Current_Scheme_Values[8];
CK_IsZip.Checked:=Current_Scheme_Values[9]='1';
RadioGroup1.ItemIndex:=StrToInt(Current_Scheme_Values[10]);
CK_LeveLast.Checked:=Current_Scheme_Values[11]='1';
ftp_host.Text:=Current_Scheme_Values[12];
ftp_use.Text:=Current_Scheme_Values[13];
ftp_pass.Text:=decode_string(Current_Scheme_Values[14]);
ftp_port.Text:=Current_Scheme_Values[15];
ftp_dmp.Checked:=Current_Scheme_Values[16]='1';
ftp_rar.Checked:=Current_Scheme_Values[17]='1';
ftp_dir.Text:=Current_Scheme_Values[22];
Ed_HoldDays.Text := Current_Scheme_Values[20];
CK_IsDelZip.Checked:=Current_Scheme_Values[21]='1';
//2012-02-28 压缩文件密码
Ed_zippassword.Text:=decode_string(Current_Scheme_Values[23]);
//2012-09-15 ORACLE_HOME
Ed_OracleHome.Text := Current_Scheme_Values[24];
//2019-11-05 增加读取oracle 缺省主目录
if Ed_OracleHome.Text = '' then
begin
//2019-11-07 缺省用本地的 Oracle10gClient 客户端 需要改在 GetCurrentScheme 函数中设置
if DirectoryExists(WorkDir+'\..\Oracle10gClient') then
begin
d := GetCurrentDir;
SetCurrentDir(WorkDir+'\..\Oracle10gClient');
Ed_OracleHome.Text := GetCurrentDir;
SetCurrentDir(d);
end else
Ed_OracleHome.Text := GetOracleHomeDir;
end;
//2016-05-16 直接连接地址
ED_Server2.Text := Current_Scheme_Values[25];
//2019-10-31 ftp主动模式
CK_Passive.Checked:=Current_Scheme_Values[26]='1';
//2019-11-07 是否显示界面和中断是否继续
CK_IsShow.Checked:=Current_Scheme_Values[27]='1';
CK_IsContinue.Checked:=Current_Scheme_Values[28]='1';
ShowLastTime;
SetTheItems(CB_dbtype.Items,Database_Types);
CB_dbtype.ItemIndex := StrToIntDef(Current_Scheme_Values[29],0) mod length(Database_Types);
setDatabaseParam(Ed_OracleHome.Text,ED_Server2.Text,CB_dbtype.ItemIndex);
//xxy 2021-12-28 ftp是否进行utf8转换和时区转换
ck_ftpUtf8.Checked:= Current_Scheme_Values[31]='1';
ck_ftpUTC.Checked:= Current_Scheme_Values[32]='1';
RadioGroup1Click(self);
if CB_dbtype.ItemIndex = 0 then //2020-09-05 只有 oracle 才设置
SetExpParamCurrent(ParStringList);
CK_IsZipClick(CK_IsZip);
end;
procedure Tfrm_Scheme.GetOraUsers;
var t:TStrings;
begin
begin
CL_OraUserList.Clear;
CL_OraUserList.Items.Add('全库导出');
ShowFullDatabase((ParStringList.Count>0) and (ParStringList.IndexOf('FULL=Y')>=0) );
t := TStringList.Create;
try
GetStringsList1(t,'SELECT USERNAME FROM ALL_USERS WHERE USERNAME NOT LIKE ''%$%''',ED_User.Text,ED_Pass.Text,ED_Server2.Text,Ed_OracleHome.Text);//,CL_OraUserList.Items);
CL_OraUserList.Items.AddStrings(t);
finally
t.Destroy;
end;
ShowExpOwners(ParStringList,ME_TableName,CL_OraUserList);
end;
end;
procedure Tfrm_Scheme.SetExpParamCurrent(value:TStrings);
var
i:Integer;
s:string;
b:boolean;
begin
If value.Count<1 Then exit;
for i := 0 to Length(EXP_PARAM[0])-1 do
begin
s:=EXP_PARAM[1,i];
//s1:='';
b:=false;
If EXP_PARAM[2,i]<>'' Then
begin
s:=s+'='+YESWORD;
end;
If value.IndexOf(s)>=0 Then
b:=true;
CL_EXPParam.Checked[i]:=b;
end;
ShowFullDatabase(value.IndexOf('FULL=Y')>=0);
ShowExpTables(value,ME_TableName);
ShowExpOwners(value,ME_TableName,CL_OraUserList);
ShowOtherParam(self,value,true);
end;
procedure Tfrm_Scheme.ShowFullDatabase(b:boolean);
begin
If CL_OraUserList.Items.Count<1 Then exit;
CL_OraUserList.Checked[0]:=b;
CL_OraUserListClickCheck(CL_OraUserList);
end;
procedure Tfrm_Scheme.SP_ClearTableNameClick(Sender: TObject);
begin
ME_TableName.Clear;
end;
procedure Tfrm_Scheme.seleBClick(Sender: TObject);
var selectValues,item:TStrings;
sqlstr:String;
begin
If CL_OraUserList.Checked[0] Then Exit;
selectValues:=ME_TableName.Lines;
sqlstr:=GetSelectText(CL_OraUserList);
If sqlstr='' Then
sqlstr:='SELECT TABLE_NAME N FROM USER_TABLES ORDER BY N'
Else
sqlstr:='SELECT OWNER||''.''||TABLE_NAME N FROM ALL_TABLES WHERE OWNER IN ('+sqlstr+') ORDER BY N';
StartSelect(sqlstr,selectValues,item,ED_User.Text,ED_Pass.Text,ED_Server2.Text,Ed_OracleHome.Text);
end;
procedure Tfrm_Scheme.exportClick(Sender: TObject);
var param:String;
begin
param:=getTempParam;
RunBack(param,'',CK_IsShow.Checked);
SaveLogFile(1);
end;
function Tfrm_Scheme.getTempParam:String;
var param:String;
begin
setDatabaseParam(Ed_OracleHome.Text,ED_Server2.Text);
ServerDate:=getServerdate(ED_User.Text,ED_Pass.Text,ED_Server2.Text,Ed_OracleHome.Text);// GetStringsList1('SELECT TO_CHAR(SYSDATE,''YYYY-MM-DD'') FROM DUAL',ED_User.Text,ED_Pass.Text,ED_Server.Text).Strings[0];
param := '0 -1 ';
if CK_IsZip.Checked then
param:= param+winrarPath
else
param:= param+'NULL';
If Current_Scheme_Values[1]=PAR_DEFAULT_FILE Then
param := param + ' NULL'
Else
param := param + ' '+ Current_Scheme_Values[1];
param:= param+' '+ServerDate;
SaveTempScheme;
SetParFile('temp');
Result:=param;
end;
function Tfrm_Scheme.SetParFile(name:String):String;
var s:String;
i:integer;
t:TStrings;
a:TArray;
begin
//2020-09-06 只有 Oracle 才保存导出文件,SQL Server 与 MySQL 都不保存
if CB_dbtype.ItemIndex > 0 then
exit;
ParStringList.Clear;
If CL_OraUserList.Checked[0] Then
Begin
ParStringList.Add('FULL=Y');
End Else If ME_TableName.Lines.Count<1 Then Begin
s:='OWNER=('+GetSelectText(CL_OraUserList)+')';
If s<>'OWNER=()' Then
ParStringList.Add(s);
End Else Begin
ParStringList.Add('TABLES=(');
FOR I:= 0 to ME_TableName.Lines.Count-1 do
begin
s:=ME_TableName.Lines.Strings[i];
If i>0 Then
s:=','+s;
ParStringList.Add(s);
end;
ParStringList.Add(')');
End;
t := TStringlist.Create;
try
GetExpParam(t,CL_EXPParam,EXP_PARAM[1],EXP_PARAM[2]);
ParStringList.AddStrings(t);
ParStringList.Add('FEEDBACK=1000');
GetOtherParam(t,frm_Scheme,true);
ParStringList.AddStrings(t);
if Cb_inctype.ItemIndex > 0 then
begin
a := split(INCTYPE_PARAM[0],',');
s := Scheme_Values[30]+ '='+a[Cb_inctype.ItemIndex];
ParStringList.Add(s);
ParStringList.Delete(ParStringList.IndexOfName('CONSISTENT'));
end;
finally
t.Destroy;
end;
If not FileExists(PAR_DIR) Then
CreateDir(PAR_DIR);
s:=GetParFileName(name);
ParStringList.SaveToFile(s);
If Current_Scheme_Values[1]=PAR_DEFAULT_FILE Then
result:='NULL'
Else
Result:=Current_Scheme_Values[1];
end;
procedure Tfrm_Scheme.WriteTheScheme(name:String;var sch:array of String);
begin
If name='' Then name:=Ed_Name.Text;
sch[0]:=name;
sch[1]:=name;
sch[2]:=TimeToStr(DateTimePicker1.Time);
sch[3]:=FormatDateTime('YYYY-MM-DD',DateTimePicker2.Date);
sch[4]:=IntToStr(ComboBox2.ItemIndex);
sch[5]:=ED_User.Text;
sch[6]:=encode_string(ED_Pass.Text);
sch[7]:=ED_Server.Text;
sch[8]:=ED_ArcDir.Text;
IF CK_IsZip.Checked THEN
sch[9]:='1'
ELSE
sch[9]:='0';
sch[10]:=IntToStr(RadioGroup1.ItemIndex);
IF CK_LeveLast.Checked THEN
sch[11]:='1'
ELSE
sch[11]:='0';
sch[12]:=ftp_host.Text;
sch[13]:=ftp_use.Text;
sch[14]:=encode_string(ftp_pass.Text);
sch[15]:=ftp_port.Text;
IF ftp_dmp.Checked THEN
sch[16]:='1'
ELSE
sch[16]:='0';
IF ftp_rar.Checked THEN
sch[17]:='1'
ELSE
sch[17]:='0';
sch[20] := Ed_HoldDays.Text;
IF CK_IsDelZip.Checked THEN
sch[21]:='1'
ELSE
sch[21]:='0';
sch[22]:=ftp_dir.Text;
//2012-02-28 压缩密码
sch[23]:=encode_string(trim(Ed_zippassword.Text));
//2012-09-15 ORACLE_HOME
sch[24] := trim(Ed_OracleHome.Text);
//2016-05-16 直接连接地址
sch[25] := trim(ED_Server2.Text);
//2019-10-31 ftp主动模式
if CK_Passive.Checked then
sch[26] := '1'
else
sch[26] := '0';
//2019-11-07 是否显示界面和是否继续
if CK_IsShow.Checked then
sch[27] := '1'
else
sch[27] := '0';
if CK_IsContinue.Checked then
sch[28] := '1'
else
sch[28] := '0';
if CB_dbtype.ItemIndex < 0 then
sch[29] := '0'
else
sch[29] := IntToStr(CB_dbtype.ItemIndex);
//2020-09-05 增加增量类型
if Cb_inctype.ItemIndex < 0 then
sch[30] := '0'
else
sch[30] := IntToStr(Cb_inctype.ItemIndex);
//xxy 2021-12-28 增加 ftputf8 和 ftp时区
if ck_ftpUtf8.Checked then
sch[31] := '1'
else
sch[31] := '0';
if ck_ftpUTC.Checked then
sch[32] := '1'
else
sch[32] := '0';
end;
procedure Tfrm_Scheme.SP_SaveSchemeClick(Sender: TObject);
begin
State:=SaveCurrentScheme('');
SetParFile(Ed_Name.Text);
SaveLogFile(2);
close;
end;
procedure Tfrm_Scheme.autoBackClick(Sender: TObject);
var value:Boolean;
begin
value:=not AlarmLists1.Started;
if value then
begin
autoBack.Caption:='停止自动';
end else
autoBack.Caption:='启动自动';
AlarmLists1.Started:=value;
end;
procedure Tfrm_Scheme.FormCreate(Sender: TObject);
begin
frm_Scheme:=self;
SetTheItems(ComboBox2.Items,RUN_CYCLE);
ComboBox2.ItemIndex := 0;
ParStringList:=TStringList.Create;
LoadParFile;
setDbType(StrToIntDef(Current_Scheme_Values[29],0) mod length(Database_Types));
State := 0;
end;
procedure Tfrm_Scheme.SpeedButton1Click(Sender: TObject);
var s:TStrings;
begin
S:=TStringList.Create;
try
setDatabaseParam(Ed_OracleHome.Text,ED_Server2.Text);
GetStringsList1(s,'select SYSDATE from dual',ED_User.Text,ED_Pass.Text,ED_Server.Text,Ed_OracleHome.Text);
ShowMessage(S.Text);
finally
s.Destroy;
end;
end;
function Tfrm_Scheme.SaveCurrentScheme(name:String):integer;
var
count,i:Integer;
begin
Result:=1;
WriteTheScheme(name,Current_Scheme_Values);
name:=Current_Scheme_Values[0];
count:=0;
if Current_Scheme_Values[19]='' then
Current_Scheme_Values[19]:='0';
If OriState = 1 Then
Begin
inc(Scheme_Count);
index:=Scheme_Count;
Current_Scheme_Values[18]:='';
Current_Scheme_Values[19]:='0';
//Result:=1;
count:=Scheme_Count;
End else begin
index := index + 1;
i := Integer(frm_main.ListView1.Selected.Data);
if OriState=2 then
AlarmLists1.ModifyAlarm(Current_Scheme_Values[0],Current_Scheme_Values[2]
,Current_Scheme_Values[3],Current_Scheme_Values[18],1,StrToInt(Current_Scheme_Values[19])
,StrToInt(Current_Scheme_Values[4]),i,date,date,0,0,now);
end;
WriteIniParam(index,count,0,SCHEME_VALUES,Current_Scheme_Values);
end;
procedure Tfrm_Scheme.SaveTempScheme;
var
s:String;
Temp_Scheme_Values:Array[0..ExportParamCount] Of String;
begin
s:='TEMP';
WriteTheScheme(s,Temp_Scheme_Values);
WriteIniParam(0,0,0,SCHEME_VALUES,Temp_Scheme_Values);
end;
procedure Tfrm_Scheme.FormClose(Sender: TObject; var Action: TCloseAction);
begin
end;
procedure Tfrm_Scheme.CK_IsZipClick(Sender: TObject);
begin
Ed_zippassword.Enabled := CK_IsZip.Checked;
La_zippassword.Enabled := Ed_zippassword.Enabled;
end;
procedure Tfrm_Scheme.CB_dbtypeChange(Sender: TObject);
//2020-09-04 设置不同数据库的显示方式
begin
setDbType(CB_dbtype.ItemIndex);
end;
procedure Tfrm_Scheme.setDbType(index:Integer);
//2020-09-05 分拆成单独的函数
var
b:boolean;
i:Integer;
j:Integer;
begin
i := index;
b := true;
case i of
0:begin //oracle
Panel3.Visible := true;
Splitter2.Visible := true;
Panel1.Visible := true;
//ED_Server.Width := 32;
//ED_Server2.Left := 111;
//ED_Server2.Width := 114;
Label19.Caption := 'ORA 目录';
Label3.Caption := '导出TNS';
Label23.Caption := '直连地址';
SetExpParamDefault(CL_EXPParam,EXP_PARAM[0],EXP_PARAM[2]);
SetCurrentScheme;
SB_OraUserClick(self);
end;
1:begin //sql server
Panel1.Visible := false;
Splitter2.Visible := false;
Panel3.Visible := false;
b := false;
//ED_Server.Width := 83;
//ED_Server2.Width := 82;
//ED_Server2.Left := 143;
Label19.Caption := '程序目录';
Label3.Caption := '服务器';
Label23.Caption := '数据库';
SetCurrentScheme;
end;
2:begin //MySQL
Panel1.Visible := false;
Splitter2.Visible := false;
Panel3.Visible := false;
b := false;
//ED_Server.Width := 83;
//ED_Server2.Width := 82;
//ED_Server2.Left := 143;
Label19.Caption := '程序目录';
Label3.Caption := '服务器';
Label23.Caption := '数据库';
SetCurrentScheme;
end;
end;
j := Cb_inctype.ItemIndex;
if j < 0 then
j := StrToIntDef(Current_Scheme_Values[30],0);
if j < 0 then
j := 0;
SetTheItems(Cb_inctype.Items,split(INCTYPE_PARAM[i*2+1],','));
Cb_inctype.ItemIndex := -1;
Cb_inctype.ItemIndex := j mod Cb_inctype.Items.Count;
Cb_inctype.Update;
Label22.Visible := i <> 2;
Cb_inctype.Visible := i <> 2;
SB_TestConn.Visible := b;
Label15.Visible := b;
Label16.Visible := b;
Label17.Visible := b;
se_buffer.Visible := b;
se_filesize.Visible := b;
Ed_query.Visible := b;
CL_EXPParam.Visible := b;
CB_dbtype.ItemIndex := i;
end;
procedure Tfrm_Scheme.SpeedButton2Click(Sender: TObject);
//2020-09-09 增加 ftp 测试
var
s:String;
begin
s := TestFTP(ftp_host.Text, ftp_use.Text, ftp_pass.Text,StrToIntDef(ftp_port.Text,21),not CK_Passive.Checked);
if s = 'OK' then
ShowMessage('ftp服务器连接成功!')
else
ShowMessage('ftp服务器连接失败!错误:'+s) ;
end;
end.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。