[.NET] 執行 Oracle DELETE會出現字串無效

作者: drcgs (我心中尚未崩壞的地方)   2015-04-16 19:54:19
請輸入專案類型(網站專案或者應用程式專案):VB.NET
程式碼如下:
OracleSql = "DELETE FROM table WHERE columnnsA IN ('aa','bb')"
OracleCmd = New OleDbCommand(OracleSql, OracleConn)
OracleCmd.ExecuteNonQuery()
OracleSql = "COMMIT"
OracleCmd = New OleDbCommand(OracleSql, OracleConn)
OracleCmd.ExecuteNonQuery()
OracleSql = "DELETE FROM table WHERE columnsB <> 'CK'"
OracleCmd = New OleDbCommand(OracleSql, OracleConn)
OracleCmd.ExecuteNonQuery()
OracleSql = "COMMIT"
OracleCmd = New OleDbCommand(OracleSql, OracleConn)
OracleCmd.ExecuteNonQuery()
Catch ex As Exception
WirteLog(ex.ToString)
Finally
OracleCmd.Dispose() << 這行執行會有問題!!
OracleConn.Close()
OracleConn.Dispose()
End Try
DELETE可以這樣下指令嗎? Oracle資料庫 VB.NET
我修改了N次後這樣子不會出現字元無效 但是不會出現程式介面..

Links booklink

Contact Us: admin [ a t ] ucptt.com