Skip to Content
0
Former Member
Apr 03, 2009 at 12:19 PM

Company StartTransaction problem

377 Views

Hi,

Im using SAP 2007 B PL 09 SDK. ASPNET Framework 2.0.

Im having problems when use Company.StarTransaction.

When each user execute isolate that works, but if two or more users execute ,

SQL DEAD LOCK PROCESS. Because for ALL users connected,

creates just one Process ID in SQL Server. Its like my command line

Dim oCompany as SAPBobsCom.Compay = New SapBobsCom.Company

was ignorate.

I need help, Please

Dim oCompany As SAPbobsCOM.Company = conexao.conectSAP
        Dim vReturn As Integer = oCompany.Connect

        If vRetorno <> 0 Then
            lblErroCompleto.Text = oCompany.GetLastErrorCode.ToString 
+ " " +      oCompany.GetLastErrorDescription
            If oCompany.Connected Then
                oCompany.Disconnect()
            End If
            Exit Sub
        End If

       oCompany.StartTransaction()

        ' Code  ...

           If oCompany.InTransaction Then
                                oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit)
           End If

Edited by: Leonardo Correa on Apr 3, 2009 2:24 PM