Public WriteOnly Property strConnection() As String Set(ByVal Value As String) _strConnection = Value _objConnection = New OracleConnection(Value) End Set End Property Function LoadDataAdapter() As Boolean _objDataAdapter = New OracleDataAdapter() With _objDataAdapter .SelectCommand = New OracleCommand() With .SelectCommand .CommandText="pkg_service_provided.list_for_ifsp_id" .CommandType = CommandType.StoredProcedure .Connection = _objConnection With .Parameters .Add("P_IFSP_ID", OracleType.Int32) .Add("P_CURSOR", OracleType.Cursor) End With .Parameters("P_CURSOR").Direction = ParameterDirection.Output End With .InsertCommand = New OracleCommand() With .InsertCommand .CommandText = "pkg_service_provided.add" .CommandType = CommandType.StoredProcedure .Connection = _objConnection With .Parameters .Add("p_ifsp_id", OracleType.Int32, 4, "ifsp_id") .Add("p_service_type_id", OracleType.Int32, 4, "service_type_id") .Add("p_service_provider_type_id", OracleType.Int32, 4, "service_provider_type_id") .Add("p_service_provider_id", OracleType.Int32, 4, "service_provider_id") .Add("p_payment_source_id", OracleType.Int32, 4, "payment_source_id") .Add("p_user_id", OracleType.VarChar, 10, "user_id") End With End With .DeleteCommand = New OracleCommand() With .DeleteCommand .CommandText = "p_service_provided.delete" .CommandType = CommandType.StoredProcedure .Connection = _objConnection With .Parameters .Add("p_service_provided_id", OracleType.Int32, 4, "service_provided_id") End With End With End With Session.Add("MyDataAdapter", _objDataAdapter) End Function Function Save(ByVal intIFSPIdSave As Integer) As Boolean Dim dtDataTable As DataTable = CType(Session("MyDataGrid"), DataTable) Dim strUserId As String = us.RoleName Dim drDataRow As DataRow Dim intRows As Integer For Each drDataRow In dtDataTable.Rows drDataRow("ifsp_id") = intIFSPIdSave drDataRow("user_id") = strUserId Next _objDataAdapter = CType(Session("MyDataAdapter"), OracleDataAdapter) With _objDataAdapter Try _objConnection.Open() _objTransaction = _objConnection.BeginTransaction() .InsertCommand.Transaction = _objTransaction .DeleteCommand.Transaction = _objTransaction intRows = _objDataAdapter.Update(dtDataTable) dtDataTable.AcceptChanges() _objTransaction.Commit() Return True Catch eex As Exception _objTransaction.Rollback() Response.Write(eex.ToString()) Return False Finally _objConnection.Close() End Try End With End FunctionThe LoadDataAdapter creates and populates the _objDataAdapter property which is cached. In the Save method, I create a Transaction object and set the Transaction property for the InsertCommand and the DeleteCommand, updates are not allowed, so no UpdateCommand. When the _objDataAdapter.Update is executed, I get the following message: