@@ -99,10 +99,15 @@ | |||
this.label13 = new System.Windows.Forms.Label(); | |||
this.label14 = new System.Windows.Forms.Label(); | |||
this.tabMySql = new System.Windows.Forms.TabPage(); | |||
this.txtMySqlPort = new System.Windows.Forms.TextBox(); | |||
this.label17 = new System.Windows.Forms.Label(); | |||
this.btnPostgreSqlTest = new System.Windows.Forms.Button(); | |||
this.txtMySqlServer = new System.Windows.Forms.TextBox(); | |||
this.txtMySqlHost = new System.Windows.Forms.TextBox(); | |||
this.label18 = new System.Windows.Forms.Label(); | |||
this.label19 = new System.Windows.Forms.Label(); | |||
this.txtMySqlPwd = new System.Windows.Forms.TextBox(); | |||
this.txtMySqlUser = new System.Windows.Forms.TextBox(); | |||
this.label20 = new System.Windows.Forms.Label(); | |||
this.label23 = new System.Windows.Forms.Label(); | |||
this.tabOracle = new System.Windows.Forms.TabPage(); | |||
@@ -158,11 +163,18 @@ | |||
this.pnlBottom = new System.Windows.Forms.Panel(); | |||
this.btnOK = new System.Windows.Forms.Button(); | |||
this.pnlTop = new System.Windows.Forms.Panel(); | |||
this.txtMySqlUser = new System.Windows.Forms.TextBox(); | |||
this.txtMySqlPwd = new System.Windows.Forms.TextBox(); | |||
this.txtMySqlHost = new System.Windows.Forms.TextBox(); | |||
this.txtMySqlServer = new System.Windows.Forms.TextBox(); | |||
this.txtMySqlPort = new System.Windows.Forms.TextBox(); | |||
this.tabKingbase = new System.Windows.Forms.TabPage(); | |||
this.txtKingbaselPort = new System.Windows.Forms.TextBox(); | |||
this.label42 = new System.Windows.Forms.Label(); | |||
this.btnKingbaselConn = new System.Windows.Forms.Button(); | |||
this.txtKingbaselServer = new System.Windows.Forms.TextBox(); | |||
this.txtKingbaselHost = new System.Windows.Forms.TextBox(); | |||
this.label43 = new System.Windows.Forms.Label(); | |||
this.label44 = new System.Windows.Forms.Label(); | |||
this.txtKingbaselPwd = new System.Windows.Forms.TextBox(); | |||
this.txtKingbaselUser = new System.Windows.Forms.TextBox(); | |||
this.label45 = new System.Windows.Forms.Label(); | |||
this.label46 = new System.Windows.Forms.Label(); | |||
this.pnlAll.SuspendLayout(); | |||
this.pnlCenter.SuspendLayout(); | |||
this.tabParamas.SuspendLayout(); | |||
@@ -181,6 +193,7 @@ | |||
this.groupBox2.SuspendLayout(); | |||
this.groupBox1.SuspendLayout(); | |||
this.pnlBottom.SuspendLayout(); | |||
this.tabKingbase.SuspendLayout(); | |||
this.SuspendLayout(); | |||
// | |||
// pnlAll | |||
@@ -240,6 +253,7 @@ | |||
this.tabcDS.Controls.Add(this.tabOracle); | |||
this.tabcDS.Controls.Add(this.tabTxt); | |||
this.tabcDS.Controls.Add(this.tabPostgreSql); | |||
this.tabcDS.Controls.Add(this.tabKingbase); | |||
this.tabcDS.Dock = System.Windows.Forms.DockStyle.Fill; | |||
this.tabcDS.Location = new System.Drawing.Point(4, 5); | |||
this.tabcDS.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
@@ -968,6 +982,14 @@ | |||
this.tabMySql.Text = "MySql"; | |||
this.tabMySql.UseVisualStyleBackColor = true; | |||
// | |||
// txtMySqlPort | |||
// | |||
this.txtMySqlPort.Location = new System.Drawing.Point(129, 221); | |||
this.txtMySqlPort.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtMySqlPort.Name = "txtMySqlPort"; | |||
this.txtMySqlPort.Size = new System.Drawing.Size(472, 28); | |||
this.txtMySqlPort.TabIndex = 35; | |||
// | |||
// label17 | |||
// | |||
this.label17.AutoSize = true; | |||
@@ -989,6 +1011,22 @@ | |||
this.btnPostgreSqlTest.UseVisualStyleBackColor = true; | |||
this.btnPostgreSqlTest.Click += new System.EventHandler(this.btnMySqlTest_Click); | |||
// | |||
// txtMySqlServer | |||
// | |||
this.txtMySqlServer.Location = new System.Drawing.Point(129, 90); | |||
this.txtMySqlServer.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtMySqlServer.Name = "txtMySqlServer"; | |||
this.txtMySqlServer.Size = new System.Drawing.Size(472, 28); | |||
this.txtMySqlServer.TabIndex = 32; | |||
// | |||
// txtMySqlHost | |||
// | |||
this.txtMySqlHost.Location = new System.Drawing.Point(129, 47); | |||
this.txtMySqlHost.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtMySqlHost.Name = "txtMySqlHost"; | |||
this.txtMySqlHost.Size = new System.Drawing.Size(472, 28); | |||
this.txtMySqlHost.TabIndex = 31; | |||
// | |||
// label18 | |||
// | |||
this.label18.AutoSize = true; | |||
@@ -1009,6 +1047,22 @@ | |||
this.label19.TabIndex = 29; | |||
this.label19.Text = "服务器:"; | |||
// | |||
// txtMySqlPwd | |||
// | |||
this.txtMySqlPwd.Location = new System.Drawing.Point(129, 178); | |||
this.txtMySqlPwd.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtMySqlPwd.Name = "txtMySqlPwd"; | |||
this.txtMySqlPwd.Size = new System.Drawing.Size(472, 28); | |||
this.txtMySqlPwd.TabIndex = 34; | |||
// | |||
// txtMySqlUser | |||
// | |||
this.txtMySqlUser.Location = new System.Drawing.Point(129, 133); | |||
this.txtMySqlUser.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtMySqlUser.Name = "txtMySqlUser"; | |||
this.txtMySqlUser.Size = new System.Drawing.Size(472, 28); | |||
this.txtMySqlUser.TabIndex = 33; | |||
// | |||
// label20 | |||
// | |||
this.label20.AutoSize = true; | |||
@@ -1591,45 +1645,125 @@ | |||
this.pnlTop.Size = new System.Drawing.Size(992, 7); | |||
this.pnlTop.TabIndex = 2; | |||
// | |||
// txtMySqlUser | |||
// | |||
this.txtMySqlUser.Location = new System.Drawing.Point(129, 133); | |||
this.txtMySqlUser.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtMySqlUser.Name = "txtMySqlUser"; | |||
this.txtMySqlUser.Size = new System.Drawing.Size(472, 28); | |||
this.txtMySqlUser.TabIndex = 33; | |||
// | |||
// txtMySqlPwd | |||
// | |||
this.txtMySqlPwd.Location = new System.Drawing.Point(129, 178); | |||
this.txtMySqlPwd.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtMySqlPwd.Name = "txtMySqlPwd"; | |||
this.txtMySqlPwd.Size = new System.Drawing.Size(472, 28); | |||
this.txtMySqlPwd.TabIndex = 34; | |||
// | |||
// txtMySqlHost | |||
// | |||
this.txtMySqlHost.Location = new System.Drawing.Point(129, 47); | |||
this.txtMySqlHost.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtMySqlHost.Name = "txtMySqlHost"; | |||
this.txtMySqlHost.Size = new System.Drawing.Size(472, 28); | |||
this.txtMySqlHost.TabIndex = 31; | |||
// | |||
// txtMySqlServer | |||
// | |||
this.txtMySqlServer.Location = new System.Drawing.Point(129, 90); | |||
this.txtMySqlServer.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtMySqlServer.Name = "txtMySqlServer"; | |||
this.txtMySqlServer.Size = new System.Drawing.Size(472, 28); | |||
this.txtMySqlServer.TabIndex = 32; | |||
// | |||
// txtMySqlPort | |||
// | |||
this.txtMySqlPort.Location = new System.Drawing.Point(129, 221); | |||
this.txtMySqlPort.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtMySqlPort.Name = "txtMySqlPort"; | |||
this.txtMySqlPort.Size = new System.Drawing.Size(472, 28); | |||
this.txtMySqlPort.TabIndex = 35; | |||
// tabKingbase | |||
// | |||
this.tabKingbase.Controls.Add(this.txtKingbaselPort); | |||
this.tabKingbase.Controls.Add(this.label42); | |||
this.tabKingbase.Controls.Add(this.btnKingbaselConn); | |||
this.tabKingbase.Controls.Add(this.txtKingbaselServer); | |||
this.tabKingbase.Controls.Add(this.txtKingbaselHost); | |||
this.tabKingbase.Controls.Add(this.label43); | |||
this.tabKingbase.Controls.Add(this.label44); | |||
this.tabKingbase.Controls.Add(this.txtKingbaselPwd); | |||
this.tabKingbase.Controls.Add(this.txtKingbaselUser); | |||
this.tabKingbase.Controls.Add(this.label45); | |||
this.tabKingbase.Controls.Add(this.label46); | |||
this.tabKingbase.Location = new System.Drawing.Point(4, 28); | |||
this.tabKingbase.Name = "tabKingbase"; | |||
this.tabKingbase.Size = new System.Drawing.Size(968, 521); | |||
this.tabKingbase.TabIndex = 9; | |||
this.tabKingbase.Text = "Kingbase"; | |||
this.tabKingbase.UseVisualStyleBackColor = true; | |||
// | |||
// txtKingbaselPort | |||
// | |||
this.txtKingbaselPort.Location = new System.Drawing.Point(161, 219); | |||
this.txtKingbaselPort.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtKingbaselPort.Name = "txtKingbaselPort"; | |||
this.txtKingbaselPort.Size = new System.Drawing.Size(472, 28); | |||
this.txtKingbaselPort.TabIndex = 57; | |||
// | |||
// label42 | |||
// | |||
this.label42.AutoSize = true; | |||
this.label42.Location = new System.Drawing.Point(94, 222); | |||
this.label42.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); | |||
this.label42.Name = "label42"; | |||
this.label42.Size = new System.Drawing.Size(62, 18); | |||
this.label42.TabIndex = 55; | |||
this.label42.Text = "端口:"; | |||
// | |||
// btnKingbaselConn | |||
// | |||
this.btnKingbaselConn.Location = new System.Drawing.Point(593, 265); | |||
this.btnKingbaselConn.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.btnKingbaselConn.Name = "btnKingbaselConn"; | |||
this.btnKingbaselConn.Size = new System.Drawing.Size(118, 36); | |||
this.btnKingbaselConn.TabIndex = 58; | |||
this.btnKingbaselConn.Text = "测试连接"; | |||
this.btnKingbaselConn.UseVisualStyleBackColor = true; | |||
// | |||
// txtKingbaselServer | |||
// | |||
this.txtKingbaselServer.Location = new System.Drawing.Point(161, 85); | |||
this.txtKingbaselServer.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtKingbaselServer.Name = "txtKingbaselServer"; | |||
this.txtKingbaselServer.Size = new System.Drawing.Size(472, 28); | |||
this.txtKingbaselServer.TabIndex = 53; | |||
// | |||
// txtKingbaselHost | |||
// | |||
this.txtKingbaselHost.Location = new System.Drawing.Point(161, 42); | |||
this.txtKingbaselHost.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtKingbaselHost.Name = "txtKingbaselHost"; | |||
this.txtKingbaselHost.Size = new System.Drawing.Size(472, 28); | |||
this.txtKingbaselHost.TabIndex = 52; | |||
// | |||
// label43 | |||
// | |||
this.label43.AutoSize = true; | |||
this.label43.Location = new System.Drawing.Point(94, 91); | |||
this.label43.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); | |||
this.label43.Name = "label43"; | |||
this.label43.Size = new System.Drawing.Size(62, 18); | |||
this.label43.TabIndex = 51; | |||
this.label43.Text = "实例:"; | |||
// | |||
// label44 | |||
// | |||
this.label44.AutoSize = true; | |||
this.label44.Location = new System.Drawing.Point(76, 48); | |||
this.label44.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); | |||
this.label44.Name = "label44"; | |||
this.label44.Size = new System.Drawing.Size(80, 18); | |||
this.label44.TabIndex = 50; | |||
this.label44.Text = "服务器:"; | |||
// | |||
// txtKingbaselPwd | |||
// | |||
this.txtKingbaselPwd.Location = new System.Drawing.Point(161, 173); | |||
this.txtKingbaselPwd.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtKingbaselPwd.Name = "txtKingbaselPwd"; | |||
this.txtKingbaselPwd.Size = new System.Drawing.Size(472, 28); | |||
this.txtKingbaselPwd.TabIndex = 56; | |||
// | |||
// txtKingbaselUser | |||
// | |||
this.txtKingbaselUser.Location = new System.Drawing.Point(161, 128); | |||
this.txtKingbaselUser.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); | |||
this.txtKingbaselUser.Name = "txtKingbaselUser"; | |||
this.txtKingbaselUser.Size = new System.Drawing.Size(472, 28); | |||
this.txtKingbaselUser.TabIndex = 54; | |||
// | |||
// label45 | |||
// | |||
this.label45.AutoSize = true; | |||
this.label45.Location = new System.Drawing.Point(94, 177); | |||
this.label45.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); | |||
this.label45.Name = "label45"; | |||
this.label45.Size = new System.Drawing.Size(62, 18); | |||
this.label45.TabIndex = 49; | |||
this.label45.Text = "密码:"; | |||
// | |||
// label46 | |||
// | |||
this.label46.AutoSize = true; | |||
this.label46.Location = new System.Drawing.Point(76, 134); | |||
this.label46.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); | |||
this.label46.Name = "label46"; | |||
this.label46.Size = new System.Drawing.Size(80, 18); | |||
this.label46.TabIndex = 48; | |||
this.label46.Text = "用户名:"; | |||
// | |||
// frmDatabaseParams | |||
// | |||
@@ -1674,6 +1808,8 @@ | |||
this.groupBox1.ResumeLayout(false); | |||
this.groupBox1.PerformLayout(); | |||
this.pnlBottom.ResumeLayout(false); | |||
this.tabKingbase.ResumeLayout(false); | |||
this.tabKingbase.PerformLayout(); | |||
this.ResumeLayout(false); | |||
} | |||
@@ -1814,5 +1950,17 @@ | |||
private System.Windows.Forms.TextBox txtMySqlHost; | |||
private System.Windows.Forms.TextBox txtMySqlPwd; | |||
private System.Windows.Forms.TextBox txtMySqlUser; | |||
private System.Windows.Forms.TabPage tabKingbase; | |||
private System.Windows.Forms.TextBox txtKingbaselPort; | |||
private System.Windows.Forms.Label label42; | |||
private System.Windows.Forms.Button btnKingbaselConn; | |||
private System.Windows.Forms.TextBox txtKingbaselServer; | |||
private System.Windows.Forms.TextBox txtKingbaselHost; | |||
private System.Windows.Forms.Label label43; | |||
private System.Windows.Forms.Label label44; | |||
private System.Windows.Forms.TextBox txtKingbaselPwd; | |||
private System.Windows.Forms.TextBox txtKingbaselUser; | |||
private System.Windows.Forms.Label label45; | |||
private System.Windows.Forms.Label label46; | |||
} | |||
} |
@@ -151,6 +151,14 @@ namespace CNAS_DBSync | |||
this.txtPostgreSqlPwd.Text = syncInstrumentItem.SyncInstrumentDSInfo.UserPwd; | |||
this.txtPostgreSqlPort.Text = syncInstrumentItem.SyncInstrumentDSInfo.Port; | |||
break; | |||
case DataSourceType.Kingbase: | |||
this.tabcDS.SelectedIndex = 9; | |||
this.txtKingbaselHost.Text = syncInstrumentItem.SyncInstrumentDSInfo.Host; | |||
this.txtKingbaselServer.Text = syncInstrumentItem.SyncInstrumentDSInfo.ServerName; | |||
this.txtKingbaselUser.Text = syncInstrumentItem.SyncInstrumentDSInfo.UserId; | |||
this.txtKingbaselPwd.Text = syncInstrumentItem.SyncInstrumentDSInfo.UserPwd; | |||
this.txtKingbaselPort.Text = syncInstrumentItem.SyncInstrumentDSInfo.Port; | |||
break; | |||
default: | |||
break; | |||
} | |||
@@ -251,6 +259,13 @@ namespace CNAS_DBSync | |||
syncInstrumentItem.SyncInstrumentDSInfo.UserPwd = this.txtPostgreSqlPwd.Text.Trim(); | |||
syncInstrumentItem.SyncInstrumentDSInfo.Port = this.txtPostgreSqlPort.Text.Trim(); | |||
break; | |||
case DataSourceType.Kingbase: | |||
syncInstrumentItem.SyncInstrumentDSInfo.Host = this.txtKingbaselHost.Text.Trim(); | |||
syncInstrumentItem.SyncInstrumentDSInfo.ServerName = this.txtKingbaselServer.Text.Trim(); | |||
syncInstrumentItem.SyncInstrumentDSInfo.UserId = this.txtKingbaselUser.Text.Trim(); | |||
syncInstrumentItem.SyncInstrumentDSInfo.UserPwd = this.txtKingbaselPwd.Text.Trim(); | |||
syncInstrumentItem.SyncInstrumentDSInfo.Port = this.txtKingbaselPort.Text.Trim(); | |||
break; | |||
default: | |||
syncInstrumentItem.SyncInstrumentDSInfo.Path = this.txtInportExcel.Text.Trim(); | |||
syncInstrumentItem.SyncInstrumentDSInfo.Host = ""; | |||
@@ -547,6 +562,35 @@ namespace CNAS_DBSync | |||
} | |||
syncInstrumentItem.SyncInstrumentDSInfo.InstrumentDataSourceType = DataSourceType.PostgreSQL; | |||
} | |||
if (e.TabPage == tabKingbase) | |||
{ | |||
if (!CheckExcelControl() || !CheckAccessControl() || !CheckSQLiteControl() || | |||
!CheckSQLServerControl() || !CheckMySqlControl() || !CheckOracleControl() || | |||
!CheckFoxproControl() || !CheckTxtControl() || !CheckPostgreSqlControl()) | |||
{ | |||
if (MessageBox.Show("其他数据源存在已保存数据,继续将删除这些值,是否继续", "提示", | |||
MessageBoxButtons.OKCancel) == DialogResult.OK) | |||
{ | |||
ClearAccessControl(); | |||
ClearExcelControl(); | |||
ClearSqliteControl(); | |||
ClearSQLServerControl(); | |||
ClearMySQLControl(); | |||
ClearOracleControl(); | |||
ClearFoxproControl(); | |||
ClearTxtControl(); | |||
ClearPostgreSqlControl(); | |||
ClearObjectValue(); | |||
} | |||
else | |||
{ | |||
ChangeSelectTabPageByType(); | |||
return; | |||
} | |||
} | |||
syncInstrumentItem.SyncInstrumentDSInfo.InstrumentDataSourceType = DataSourceType.Kingbase; | |||
} | |||
} | |||
//根据数据源类型切换Tab页 | |||
@@ -574,6 +618,7 @@ namespace CNAS_DBSync | |||
break; | |||
case DataSourceType.Excel: | |||
case DataSourceType.PostgreSQL: | |||
case DataSourceType.Kingbase: | |||
default: | |||
tabcDS.SelectedTab = tabExcel; | |||
break; | |||
@@ -1099,21 +1144,72 @@ namespace CNAS_DBSync | |||
} | |||
} | |||
private void btnPostgreSqlConn_Click(object sender, EventArgs e) | |||
private bool CheckPostgreSqlControl() | |||
{ | |||
if (this.txtPostgreSqlHost.Text.Trim() != "" || this.txtPostgreSqlServer.Text.Trim() != "" || | |||
this.txtPostgreSqlUser.Text.Trim() != "" || this.txtPostgreSqlPwd.Text.Trim() != "" || | |||
this.txtPostgreSqlPort.Text.Trim() != "") | |||
return false; | |||
else | |||
return true; | |||
} | |||
//if (CnasDataOperationFact.CnasDataOperation().TestConnect(new DataBaseInfo() | |||
//{ | |||
// DBHost = this.txtPostgreSqlHost.Text.Trim(), | |||
// DBName = this.txtPostgreSqlServer.Text.Trim(), | |||
// DBUser = this.txtPostgreSqlUser.Text.Trim(), | |||
// DBPwd = this.txtPostgreSqlPwd.Text.Trim(), | |||
// DBPort = this.txtPostgreSqlPort.Text.Trim() | |||
//})) | |||
// MessageBox.Show("连接成功!"); | |||
//else | |||
// MessageBox.Show("连接失败!"); | |||
private void ClearPostgreSqlControl() | |||
{ | |||
this.txtPostgreSqlHost.Text = ""; | |||
this.txtPostgreSqlServer.Text = ""; | |||
this.txtPostgreSqlUser.Text = ""; | |||
this.txtPostgreSqlPwd.Text = ""; | |||
this.txtPostgreSqlPort.Text = ""; | |||
} | |||
private bool CheckKingbaseControl() | |||
{ | |||
if (this.txtKingbaselHost.Text.Trim() != "" || this.txtKingbaselServer.Text.Trim() != "" || | |||
this.txtKingbaselUser.Text.Trim() != "" || this.txtKingbaselPwd.Text.Trim() != "" || | |||
this.txtKingbaselPort.Text.Trim() != "") | |||
return false; | |||
else | |||
return true; | |||
} | |||
private void ClearKingbaseControl() | |||
{ | |||
this.txtKingbaselHost.Text = ""; | |||
this.txtKingbaselServer.Text = ""; | |||
this.txtKingbaselUser.Text = ""; | |||
this.txtKingbaselPwd.Text = ""; | |||
this.txtKingbaselPort.Text = ""; | |||
} | |||
private void btnKingbaselConn_Click(object sender, EventArgs e) | |||
{ | |||
if (this.txtKingbaselHost.Text.Trim() == "" || this.txtKingbaselServer.Text.Trim() == "" || | |||
this.txtKingbaselUser.Text.Trim() == "" || this.txtKingbaselPort.Text.Trim() == "") | |||
{ | |||
MessageBox.Show("请填写相关连接信息。"); | |||
return; | |||
} | |||
InstrumentDataSourceInfo dbinfo = new InstrumentDataSourceInfo(); | |||
dbinfo.Host = this.txtKingbaselHost.Text.Trim(); | |||
dbinfo.ServerName = this.txtKingbaselServer.Text.Trim(); | |||
dbinfo.UserId = this.txtKingbaselUser.Text.Trim(); | |||
dbinfo.UserPwd = this.txtKingbaselPwd.Text.Trim(); | |||
dbinfo.Port = this.txtKingbaselPort.Text.Trim(); | |||
// 假设有KingbaseInstrumentData类来处理连接测试 | |||
if (new KingbaseInstrumentData(dbinfo, new object[] { "", "", "" }).TestConnection()) | |||
MessageBox.Show("连接成功!"); | |||
else | |||
MessageBox.Show("连接失败!"); | |||
} | |||
private void btnPostgreSqlConn_Click(object sender, EventArgs e) | |||
{ | |||
if (this.txtPostgreSqlHost.Text.Trim() == "" || this.txtPostgreSqlServer.Text.Trim() == "" || | |||
this.txtPostgreSqlUser.Text.Trim() == "" || this.txtPostgreSqlPort.Text.Trim() == "") | |||
{ | |||
@@ -1137,6 +1233,12 @@ namespace CNAS_DBSync | |||
else | |||
MessageBox.Show("连接失败!"); | |||
//if (new PostgreSQLServerInstrumentData(dbinfo, new object[] { "", "", "" }).TestConnection()) | |||
// MessageBox.Show("连接成功!"); | |||
//else | |||
@@ -1164,24 +1266,5 @@ namespace CNAS_DBSync | |||
//else | |||
// MessageBox.Show("连接失败!"); | |||
} | |||
private bool CheckPostgreSqlControl() | |||
{ | |||
if (this.txtPostgreSqlHost.Text.Trim() != "" || this.txtPostgreSqlServer.Text.Trim() != "" || | |||
this.txtPostgreSqlUser.Text.Trim() != "" || this.txtPostgreSqlPwd.Text.Trim() != "" || | |||
this.txtPostgreSqlPort.Text.Trim() != "") | |||
return false; | |||
else | |||
return true; | |||
} | |||
private void ClearPostgreSqlControl() | |||
{ | |||
this.txtPostgreSqlHost.Text = ""; | |||
this.txtPostgreSqlServer.Text = ""; | |||
this.txtPostgreSqlUser.Text = ""; | |||
this.txtPostgreSqlPwd.Text = ""; | |||
this.txtPostgreSqlPort.Text = ""; | |||
} | |||
} | |||
} |
@@ -19,7 +19,8 @@ namespace CnasSynchrousModel | |||
Oracle, | |||
FoxPro, | |||
TXT, | |||
PostgreSQL | |||
PostgreSQL, | |||
Kingbase | |||
} | |||
public enum PathType | |||
@@ -3203,3 +3203,47 @@ DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error | |||
记录时间:2025-02-14 18:56:11,635 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3333-===SELECT * FROM stu Where 0=1System.Data.DataSet | |||
记录时间:2025-02-14 18:56:11,635 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3443-===SELECT * FROM stu Where 0=1System.Data.DataSet | |||
记录时间:2025-02-14 18:56:11,635 线程ID:[1]- 错误描述:类名:MySQLDAL 方法名:GetTableStruct 信息:===-333-===stuMySQLHelper.ExecuteDataSet(strSql)Table | |||
记录时间:2025-02-14 18:56:47,635 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3113-===select * from test.STU where INTIME >convert( '2025-02-04 18:56:47',datetime)server=localhost;port=3306;user=root;password=1;database=test;CharSet=utf8;Allow User Variables=True | |||
记录时间:2025-02-14 18:56:47,643 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3223-===select * from test.STU where INTIME >convert( '2025-02-04 18:56:47',datetime)server=localhost;port=3306;user=root;password=1;database=test;CharSet=utf8;Allow User Variables=True | |||
记录时间:2025-02-14 18:56:47,643 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3223-===select * from test.STU where INTIME >convert( '2025-02-04 18:56:47',datetime)System.Data.DataSet | |||
记录时间:2025-02-14 18:56:47,666 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3333-===select * from test.STU where INTIME >convert( '2025-02-04 18:56:47',datetime)System.Data.DataSet | |||
记录时间:2025-02-14 18:56:47,667 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3443-===select * from test.STU where INTIME >convert( '2025-02-04 18:56:47',datetime)System.Data.DataSet | |||
记录时间:2025-02-14 18:56:47,670 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3113-===SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='STU' and table_schema='test'server=localhost;port=3306;user=root;password=1;database=test;CharSet=utf8;Allow User Variables=True | |||
记录时间:2025-02-14 18:56:47,670 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3223-===SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='STU' and table_schema='test'server=localhost;port=3306;user=root;password=1;database=test;CharSet=utf8;Allow User Variables=True | |||
记录时间:2025-02-14 18:56:47,670 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3223-===SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='STU' and table_schema='test'System.Data.DataSet | |||
记录时间:2025-02-14 18:56:47,671 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3333-===SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='STU' and table_schema='test'System.Data.DataSet | |||
记录时间:2025-02-14 18:56:47,672 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3443-===SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='STU' and table_schema='test'System.Data.DataSet | |||
记录时间:2025-02-14 18:56:54,564 线程ID:[1]- 错误描述:类名:PostgreSQLHelper 方法名:ExecuteDataSet 信息:===-3113-===select * from cnas.public.STU where "InTime">TO_TIMESTAMP('2025-02-04 18:56:53', 'YYYY-MM-DD HH24:MI:SS');Server=112.33.111.160;Port=5432;Database=cnas;User Id=postgres;Password=Auseft@2025qwer; | |||
记录时间:2025-02-14 18:56:54,564 线程ID:[1]- 错误描述:类名:PostgreSQLHelper 方法名:ExecuteDataSet 信息:===-3223-===select * from cnas.public.STU where "InTime">TO_TIMESTAMP('2025-02-04 18:56:53', 'YYYY-MM-DD HH24:MI:SS');Server=112.33.111.160;Port=5432;Database=cnas;User Id=postgres;Password=Auseft@2025qwer; | |||
记录时间:2025-02-14 18:56:54,565 线程ID:[1]- 错误描述:类名:PostgreSQLHelper 方法名:ExecuteDataSet 信息:===-3223-===select * from cnas.public.STU where "InTime">TO_TIMESTAMP('2025-02-04 18:56:53', 'YYYY-MM-DD HH24:MI:SS');System.Data.DataSet | |||
记录时间:2025-02-14 18:56:54,700 线程ID:[1]- 错误描述:类名:PostgreSQLHelper 方法名:ExecuteDataSet 信息:===-3333-===select * from cnas.public.STU where "InTime">TO_TIMESTAMP('2025-02-04 18:56:53', 'YYYY-MM-DD HH24:MI:SS');System.Data.DataSet | |||
记录时间:2025-02-14 18:56:54,757 线程ID:[1]- 错误描述:类名:PostgreSQLHelper 方法名:ExecuteDataSet 信息:===-3443-===select * from cnas.public.STU where "InTime">TO_TIMESTAMP('2025-02-04 18:56:53', 'YYYY-MM-DD HH24:MI:SS');System.Data.DataSet | |||
记录时间:2025-02-14 18:56:54,761 线程ID:[1]- 错误描述:类名:PostgreSQLHelper 方法名:ExecuteDataSet 信息:===-3113-===SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='STU' and table_schema='cnas'Server=112.33.111.160;Port=5432;Database=cnas;User Id=postgres;Password=Auseft@2025qwer; | |||
记录时间:2025-02-14 18:56:54,762 线程ID:[1]- 错误描述:类名:PostgreSQLHelper 方法名:ExecuteDataSet 信息:===-3223-===SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='STU' and table_schema='cnas'Server=112.33.111.160;Port=5432;Database=cnas;User Id=postgres;Password=Auseft@2025qwer; | |||
记录时间:2025-02-14 18:56:54,762 线程ID:[1]- 错误描述:类名:PostgreSQLHelper 方法名:ExecuteDataSet 信息:===-3223-===SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='STU' and table_schema='cnas'System.Data.DataSet | |||
记录时间:2025-02-14 18:56:54,833 线程ID:[1]- 错误描述:类名:PostgreSQLHelper 方法名:ExecuteDataSet 信息:===-3333-===SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='STU' and table_schema='cnas'System.Data.DataSet | |||
记录时间:2025-02-14 18:56:54,885 线程ID:[1]- 错误描述:类名:PostgreSQLHelper 方法名:ExecuteDataSet 信息:===-3443-===SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='STU' and table_schema='cnas'System.Data.DataSet | |||
记录时间:2025-02-14 18:57:18,459 线程ID:[1]- 错误描述:类名:MySQLDAL 方法名:GetTableStruct 信息:===-222-===STUSELECT * FROM STU Where 0=1 | |||
记录时间:2025-02-14 18:57:18,467 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3113-===SELECT * FROM STU Where 0=1server=localhost;port=3306;user=root;password=1;database=cnas;CharSet=utf8;Allow User Variables=True | |||
记录时间:2025-02-14 18:57:18,467 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3223-===SELECT * FROM STU Where 0=1server=localhost;port=3306;user=root;password=1;database=cnas;CharSet=utf8;Allow User Variables=True | |||
记录时间:2025-02-14 18:57:18,467 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3223-===SELECT * FROM STU Where 0=1System.Data.DataSet | |||
记录时间:2025-02-14 18:57:18,469 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3333-===SELECT * FROM STU Where 0=1System.Data.DataSet | |||
记录时间:2025-02-14 18:57:18,470 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3443-===SELECT * FROM STU Where 0=1System.Data.DataSet | |||
记录时间:2025-02-14 18:57:18,470 线程ID:[1]- 错误描述:类名:MySQLDAL 方法名:GetTableStruct 信息:===-333-===STUMySQLHelper.ExecuteDataSet(strSql)Table | |||
记录时间:2025-02-14 18:57:18,477 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3113-===select COLUMN_NAME AS 'ColumnName',IS_NULLABLE AS 'IsNullable',DATA_TYPE AS 'DataType',CHARACTER_MAXIMUM_LENGTH AS 'CharMaxLenth',CHARACTER_OCTET_LENGTH AS 'CharOcterLenth',NUMERIC_PRECISION AS 'NumericPrecision',NUMERIC_SCALE AS 'NumericScale' FROM information_schema.COLUMNS WHERE TABLE_NAME LIKE 'STU'server=localhost;port=3306;user=root;password=1;database=cnas;CharSet=utf8;Allow User Variables=True | |||
记录时间:2025-02-14 18:57:18,477 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3223-===select COLUMN_NAME AS 'ColumnName',IS_NULLABLE AS 'IsNullable',DATA_TYPE AS 'DataType',CHARACTER_MAXIMUM_LENGTH AS 'CharMaxLenth',CHARACTER_OCTET_LENGTH AS 'CharOcterLenth',NUMERIC_PRECISION AS 'NumericPrecision',NUMERIC_SCALE AS 'NumericScale' FROM information_schema.COLUMNS WHERE TABLE_NAME LIKE 'STU'server=localhost;port=3306;user=root;password=1;database=cnas;CharSet=utf8;Allow User Variables=True | |||
记录时间:2025-02-14 18:57:18,477 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3223-===select COLUMN_NAME AS 'ColumnName',IS_NULLABLE AS 'IsNullable',DATA_TYPE AS 'DataType',CHARACTER_MAXIMUM_LENGTH AS 'CharMaxLenth',CHARACTER_OCTET_LENGTH AS 'CharOcterLenth',NUMERIC_PRECISION AS 'NumericPrecision',NUMERIC_SCALE AS 'NumericScale' FROM information_schema.COLUMNS WHERE TABLE_NAME LIKE 'STU'System.Data.DataSet | |||
记录时间:2025-02-14 18:57:18,487 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3333-===select COLUMN_NAME AS 'ColumnName',IS_NULLABLE AS 'IsNullable',DATA_TYPE AS 'DataType',CHARACTER_MAXIMUM_LENGTH AS 'CharMaxLenth',CHARACTER_OCTET_LENGTH AS 'CharOcterLenth',NUMERIC_PRECISION AS 'NumericPrecision',NUMERIC_SCALE AS 'NumericScale' FROM information_schema.COLUMNS WHERE TABLE_NAME LIKE 'STU'System.Data.DataSet | |||
记录时间:2025-02-14 18:57:18,488 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3443-===select COLUMN_NAME AS 'ColumnName',IS_NULLABLE AS 'IsNullable',DATA_TYPE AS 'DataType',CHARACTER_MAXIMUM_LENGTH AS 'CharMaxLenth',CHARACTER_OCTET_LENGTH AS 'CharOcterLenth',NUMERIC_PRECISION AS 'NumericPrecision',NUMERIC_SCALE AS 'NumericScale' FROM information_schema.COLUMNS WHERE TABLE_NAME LIKE 'STU'System.Data.DataSet | |||
记录时间:2025-02-14 18:57:50,620 线程ID:[1]- 错误描述:类名:MySQLDAL 方法名:GetTableStruct 信息:===-222-===STUSELECT * FROM STU Where 0=1 | |||
记录时间:2025-02-14 18:57:50,623 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3113-===SELECT * FROM STU Where 0=1server=localhost;port=3306;user=root;password=1;database=cnas;CharSet=utf8;Allow User Variables=True | |||
记录时间:2025-02-14 18:57:50,623 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3223-===SELECT * FROM STU Where 0=1server=localhost;port=3306;user=root;password=1;database=cnas;CharSet=utf8;Allow User Variables=True | |||
记录时间:2025-02-14 18:57:50,623 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3223-===SELECT * FROM STU Where 0=1System.Data.DataSet | |||
记录时间:2025-02-14 18:57:50,623 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3333-===SELECT * FROM STU Where 0=1System.Data.DataSet | |||
记录时间:2025-02-14 18:57:50,624 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3443-===SELECT * FROM STU Where 0=1System.Data.DataSet | |||
记录时间:2025-02-14 18:57:50,624 线程ID:[1]- 错误描述:类名:MySQLDAL 方法名:GetTableStruct 信息:===-333-===STUMySQLHelper.ExecuteDataSet(strSql)Table | |||
记录时间:2025-02-14 18:57:50,624 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3113-===select COLUMN_NAME AS 'ColumnName',IS_NULLABLE AS 'IsNullable',DATA_TYPE AS 'DataType',CHARACTER_MAXIMUM_LENGTH AS 'CharMaxLenth',CHARACTER_OCTET_LENGTH AS 'CharOcterLenth',NUMERIC_PRECISION AS 'NumericPrecision',NUMERIC_SCALE AS 'NumericScale' FROM information_schema.COLUMNS WHERE TABLE_NAME LIKE 'STU'server=localhost;port=3306;user=root;password=1;database=cnas;CharSet=utf8;Allow User Variables=True | |||
记录时间:2025-02-14 18:57:50,624 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3223-===select COLUMN_NAME AS 'ColumnName',IS_NULLABLE AS 'IsNullable',DATA_TYPE AS 'DataType',CHARACTER_MAXIMUM_LENGTH AS 'CharMaxLenth',CHARACTER_OCTET_LENGTH AS 'CharOcterLenth',NUMERIC_PRECISION AS 'NumericPrecision',NUMERIC_SCALE AS 'NumericScale' FROM information_schema.COLUMNS WHERE TABLE_NAME LIKE 'STU'server=localhost;port=3306;user=root;password=1;database=cnas;CharSet=utf8;Allow User Variables=True | |||
记录时间:2025-02-14 18:57:50,624 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3223-===select COLUMN_NAME AS 'ColumnName',IS_NULLABLE AS 'IsNullable',DATA_TYPE AS 'DataType',CHARACTER_MAXIMUM_LENGTH AS 'CharMaxLenth',CHARACTER_OCTET_LENGTH AS 'CharOcterLenth',NUMERIC_PRECISION AS 'NumericPrecision',NUMERIC_SCALE AS 'NumericScale' FROM information_schema.COLUMNS WHERE TABLE_NAME LIKE 'STU'System.Data.DataSet | |||
记录时间:2025-02-14 18:57:50,628 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3333-===select COLUMN_NAME AS 'ColumnName',IS_NULLABLE AS 'IsNullable',DATA_TYPE AS 'DataType',CHARACTER_MAXIMUM_LENGTH AS 'CharMaxLenth',CHARACTER_OCTET_LENGTH AS 'CharOcterLenth',NUMERIC_PRECISION AS 'NumericPrecision',NUMERIC_SCALE AS 'NumericScale' FROM information_schema.COLUMNS WHERE TABLE_NAME LIKE 'STU'System.Data.DataSet | |||
记录时间:2025-02-14 18:57:50,628 线程ID:[1]- 错误描述:类名:MySQLHelper 方法名:ExecuteDataSet 信息:===-3443-===select COLUMN_NAME AS 'ColumnName',IS_NULLABLE AS 'IsNullable',DATA_TYPE AS 'DataType',CHARACTER_MAXIMUM_LENGTH AS 'CharMaxLenth',CHARACTER_OCTET_LENGTH AS 'CharOcterLenth',NUMERIC_PRECISION AS 'NumericPrecision',NUMERIC_SCALE AS 'NumericScale' FROM information_schema.COLUMNS WHERE TABLE_NAME LIKE 'STU'System.Data.DataSet |