cancel
Showing results for 
Search instead for 
Did you mean: 

Could not commit Transation Error

Former Member
0 Kudos

Hi,

      When i create a Customer Equipment Card through DI API it shows an error message like 'Could Not Commit Transaction'.My .Net code as follows.

Private Function CreateVehicleCard(ByVal ItemCode As String, ByVal chassis As String, ByVal EngineNo As String) As String
    Try
        Dim IRetCode As Integer
        Dim oEquipmentCards As SAPbobsCOM.CustomerEquipmentCards
        oEquipmentCards = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oCustomerEquipmentCards)
        With oEquipmentCards
            .ItemCode = ItemCode
            .ManufacturerSerialNum = chassis
            .InternalSerialNum = EngineNo
            .CustomerCode = My.Settings.CustomerCode
            IRetCode = .Add()
        End With
        If IRetCode <> 0 Then
            MsgBox(oCompany.GetLastErrorDescription)
            Return ("")
        Else
            Return (oCompany.GetNewObjectKey())
        End If
    Catch
        MsgBox(Err.Description)
        Return ("")
    End Try
End Function

How can i solve the error. Pls Help

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member413321
Contributor
0 Kudos

may be by restricting InternalSerialNum field (according to the definition of Unique Number in the General Settings in SAP Business One - SriUniqFld OADM field in table)

Former Member
0 Kudos

hi.

plz...

Immediately stop the Sql server and Restart it ..

And Check it...

Any Addon is running..

if yes...

in source code check it any  start trasaction  are used r not...

if yes each start transactoin  should be end with commit or roll back ok..

n check it...

any  stored  procedures are used or not..

I think there is nothing in above code as per my knowledge..

if you not statisfy my answer...

wait for exper suggestion...