jdbc 有點搞不懂狀況了,記錄下來

2021-06-03 21:11:55 字數 3184 閱讀 4833

connection conn = null;

statement stm = null;

statement stm1 = null;

resultset rs = null;

try

while (rs.next()) catch (connectexception e)

// system.out.println("zxlmc 1= " + zx);

// zxlmc = zxlmc.substring(1, zxlmc.length() - 1);

if (zx != null) else }}

// system.out.println("zxlmc = " + zxlmc);

string yxysql = "update usr_jcsj.b_jcsj_yanxjksbjbxx a set f_vc_shebzt='1' "

+ " where exists (select f_vc_yanxsbwybs from b_jcsj_bianmaq b "

+ " where a.f_vc_yanxsbwybs= b.f_vc_yanxsbwybs and f_vc_url like '%/"

+ lmtsip + ":%' and f_vc_fabm in (" + zxlmc + "))";

string yxnsql = "update usr_jcsj.b_jcsj_yanxjksbjbxx a set f_vc_shebzt='0' "

+ " where exists (select f_vc_yanxsbwybs from b_jcsj_bianmaq b "

+ " where a.f_vc_yanxsbwybs= b.f_vc_yanxsbwybs and f_vc_url like '%/"

+ lmtsip + ":%' and f_vc_fabm not in (" + zxlmc + "))";

string fyysql = "update usr_jcsj.b_jcsj_feiyxsbjbxx a set f_vc_shebzt='1' "

+ " where exists (select f_vc_yanxsbwybs from b_jcsj_bianmaq b "

+ " where a.f_vc_feiyxsbwybs = b.f_vc_yanxsbwybs and f_vc_url like '%/"

+ lmtsip + ":%' and f_vc_fabm in (" + zxlmc + "))";

string fynsql = "update usr_jcsj.b_jcsj_feiyxsbjbxx a set f_vc_shebzt='0' "

+ " where exists (select f_vc_yanxsbwybs from b_jcsj_bianmaq b "

+ " where a.f_vc_fe"

+ ""

+ "iyxsbwybs = b.f_vc_yanxsbwybs and f_vc_url like '%/"

+ lmtsip + ":%' and f_vc_fabm not in (" + zxlmc + "))";

string bmqysql = "update b_jcsj_bianmaq set f_nb_zt='1' where f_vc_url like '%/"

+ lmtsip + ":%' and f_vc_fabm in (" + zxlmc + ")";

string bmqnsql = "update b_jcsj_bianmaq set f_nb_zt='0' where f_vc_url like '%/"

+ lmtsip + ":%' and f_vc_fabm not in (" + zxlmc + ")";

string bmqnullsql = "update b_jcsj_bianmaq set f_nb_zt='0' where f_vc_url like '%/"

+ lmtsip + ":%'";

string fynullsql = "update usr_jcsj.b_jcsj_feiyxsbjbxx a set "

+ "f_vc_shebzt='0' "

+ " where exists (select f_vc_yanxsbwybs from b_jcsj_bianmaq b "

+ " where a.f_vc_feiyxsbwybs = b.f_vc_yanxsbwybs and f_vc_url like '%/"

+ lmtsip + ":%')";

string yxnullsql = "update usr_jcsj.b_jcsj_yanxjksbjbxx a set f_vc_shebzt='0' "

+ " where exists (select f_vc_yanxsbwybs from b_jcsj_bianmaq b "

+ " where a.f_vc_yanxsbwybs= b.f_vc_yanxsbwybs and f_vc_url like '%/"

+ lmtsip + ":%')";

// system.out.println("testcheck yxysql= " + yxysql);

// system.out.println("testcheck yxnsql= " + yxnsql);

//// system.out.println("testcheck fyysql= " + fyysql);

// system.out.println("testcheck fynsql= " + fynsql);

//// system.out.println("testcheck bmqysql= " + bmqysql);

// system.out.println("testcheck bmqnsql= " + bmqnsql);

if (zxlmc.trim().equals("''")) else

// system.out.println("modify 1!");

} catch (sqlexception e) catch (instantiationexception e) catch (illegalacces***ception e) catch (classnotfoundexception e) finally catch (sqlexception e)

} 當stm1修改為stm時,迴圈裡只執行一次。

搞不懂的暴搜

暴搜優化.分析 令第 i 種裝備的數量為sum i 顯然如果 sum i 不為 0 那麼這種裝備必選一件,在這時需要考慮的總方案數為 max sum i 1 其中 sum i 50。最壞情況下所有 sum 的值都相同,令它們都等於 k,則方案數為 kn k 當 k 取 3 時取到最大值 3n 3 在...

差點搞不懂快排

include include include include include using namespace std const int num 25 這裡預設使用的pivot是a left partition將 a分成兩部分,左邊的部分小於pivot,右邊的部分大於pivot 兩種partiti...

UDPClient 的奇特現象,實在搞不懂

我有個專案,設計了乙個udp服務端。是通過udpclient 的乙個例項 同一埠 提供收發服務。當專案上線測試後,奇怪的現象發生。如果重啟過伺服器的話,伺服器可以執行一段較長時間無異常。但一段時間之後,奇怪的事情來了。1 例如之前有a b c等n個客戶端已經連線到服務端,服務端一直持續為它們 提供服...