cancel
Showing results for 
Search instead for 
Did you mean: 

Error of connection

Former Member
0 Kudos

Hello, We have currently an application which is connected to base SAP Business one via the SAPbobsCOM.Company object. This application has functioned for several months in a correct way. After a change of licence server, the application refuses to be connected with the error message according to. -2147024891 - - refused Access.

We have applied the note 833798 but without success. Cordially. S. Provost

Please Help

Accepted Solutions (1)

Accepted Solutions (1)

former_member185703
Active Contributor
0 Kudos

Hi Stéphane,

Since you changed the license server - did you make sure that the license server has been correctly set to the new license server?

Did you check the licenses on th new server?

Can you log on to the same company using the SAP Business One application?

Which version / PL do you use?

...

Regards,

Frank

Former Member
0 Kudos

Hi Frank,

I use SAP Business One 2004 [p26], and I can log on the same compagny using SAP Business one.

Regards,

Stephane

Former Member
0 Kudos

Hi Stéphane,

Please post the code that you are executing to connect here.

Thanks,

Adele

Former Member
0 Kudos

Hi Adele,

This is my code

JEvent.WriteEntry("Tentative de connexion à la base SAP.")

'// Objet permettant l'accès au registre.

Dim oRegistre As Registre.RegistreMachine

'// Résultat de la connexion.

Dim iRet As Integer

Try

oRegistre = New Registre.RegistreMachine(False, pCleRegistre)

Catch ex As Exception

Throw New Exception(ex.Message)

Exit Sub

End Try

'// Connexion DI.

oCompany = New SAPbobsCOM.Company

'// Récupération des paramêtres pour la DI Connexion.

Try

oCompany = New SAPbobsCOM.Company

oRegistre.getValCleBaseDeRegistre("sapServeur", oCompany.Server)

oRegistre.getValCleBaseDeRegistre("sapServeurLicence", oCompany.LicenseServer)

oRegistre.getValCleBaseDeRegistre("sapCompany", oCompany.CompanyDB)

oRegistre.getValCleBaseDeRegistre("sapUser", oCompany.UserName)

oRegistre.getValCleBaseDeRegistre("sapPass", oCompany.Password)

oRegistre.getValCleBaseDeRegistre("nomUserBDSAP", oCompany.DbUserName)

oRegistre.getValCleBaseDeRegistre("passBDSAP", oCompany.DbPassword)

oRegistre.getValCleBaseDeRegistre("MovalysURL", sUrlServicesWeb)

Catch ex As Exception

Throw New Exception(ex.Message)

Exit Sub

End Try

'// Connexion.

oCompany.UseTrusted = False

oCompany.language = SAPbobsCOM.BoSuppLangs.ln_French

iRet = oCompany.Connect()

If (iRet <> 0) Then

Throw New Exception("Erreur pendant la connexion SBO " & vbCr & _

oCompany.GetLastErrorCode & " - " & oCompany.GetLastErrorDescription)

Exit Sub

Else

JEvent.WriteEntry("Connexion à la base SBO " + oCompany.CompanyDB + " Réussie")

End If

Former Member
0 Kudos

Hi Stéphane,

Try leaving the following line out:

oRegistre.getValCleBaseDeRegistre("sapServeurLicence", oCompany.LicenseServer)

I don't specify a license server in my code as SBO automatically gets the license server from your server.

Hope it helps,

Adele

Answers (0)