Oracle
 sql >> база данни >  >> RDS >> Oracle

изразът за актуализиране на оракул не работи

Трябва да използвате тази структура, за да управлявате транзакции с Oracle (вижте MSDN документи ) :

Public Sub RunOracleTransaction(ByVal connectionString As String)
    Using connection As New OracleConnection(connectionString)
        connection.Open()

        Dim command As OracleCommand = connection.CreateCommand()
        Dim transaction As OracleTransaction

        ' Start a local transaction
        transaction = connection.BeginTransaction(IsolationLevel.ReadCommitted)
        ' Assign transaction object for a pending local transaction
        command.Transaction = transaction

        Try
            command.CommandText = _
                "INSERT INTO Dept (DeptNo, Dname, Loc) values (50, 'TECHNOLOGY', 'DENVER')"
            command.ExecuteNonQuery()
            command.CommandText = _
                "INSERT INTO Dept (DeptNo, Dname, Loc) values (60, 'ENGINEERING', 'KANSAS CITY')"
            command.ExecuteNonQuery()
            transaction.Commit()
            Console.WriteLine("Both records are written to database.")
        Catch e As Exception
            transaction.Rollback()
            Console.WriteLine(e.ToString())
            Console.WriteLine("Neither record was written to database.")
        End Try
    End Using
End Sub


  1. Database
  2.   
  3. Mysql
  4.   
  5. Oracle
  6.   
  7. Sqlserver
  8.   
  9. PostgreSQL
  10.   
  11. Access
  12.   
  13. SQLite
  14.   
  15. MariaDB
  1. Защо не мога да се свържа чрез jdbc с помощта на SQLcl

  2. Oracle заявка бавна с REGEXP_SUBSTR(AGGREGATOR,'[^;]+',1,LEVEL)

  3. Sql заявка на rownum

  4. Как да получите информация за всички видове данни, декларирани в даден пакет

  5. Грешка Ora 12154