我正在使用以下代码更新 oracle 中的表。它执行但更新不提交。如果我使用 Oracle SQL Developer 运行查询,它工作正常。我错过了什么?SELECT 语句按预期工作。
`Dim BillOfLadingNumber As String = txtBillOfLadingNumber.Text.Trim
Dim TrailerNumber As String = txtTrailerNumber.Text.Trim
Dim CarrierCode As String = txtCarrierCode.Text.Trim
Dim TransportationMethod As String = txtTransportationMethod.Text.Trim
Dim OracleCommand As New OracleCommand()
With OracleCommand
.Connection = OracleConnection
.CommandType = CommandType.Text
.CommandText = "UPDATE XXF_ASN_HEADERS SET BILL_OF_LADING_NUMBER ='" + BillOfLadingNumber + "',TRAILER_NUMBER ='" + TrailerNumber + "',CARRIER_CODE ='" + CarrierCode + "',TRANSPORTATION_METHOD ='" + TransportationMethod + "' WHERE HEADERID ='" + Request.QueryString("HeaderId") + "'"
End With
OracleConnection.Open()
Dim result As Integer = OracleCommand.ExecuteNonQuery()
OracleConnection.Close()
If result = 1 Then Response.Redirect("default.aspx")`