Miguel Alves Neto Posted December 1, 2015 at 04:12 PM Report Share #590276 Posted December 1, 2015 at 04:12 PM (edited) Boa tarde, na actualização 9.15 do primavera deixou de existir a opção Integrador Plataforma = New Interop.StdPlatBS900.StdPlatBS Plataforma.AbrePlataformaEmpresaIntegrador(Motor.Contexto.CodEmp, Nothing, ObjConfApl, Interop.StdBE900.EnumTipoPlataforma.tpProfissional) Passando só a existir Plataforma.AbrePlataformaEmpresa(Motor.Contexto.CodEmp, Nothing, ObjConfApl, Interop.StdBE900.EnumTipoPlataforma.tpProfissional, ObjConfApl.PwdUtilizador) Com mais opções de campos para preencher como se pode verificar. o meu código: Class '################################################################## Public Class ClassUtil Shared Plataforma As Interop.StdPlatBS900.StdPlatBS Shared ObjConfApl As Interop.StdPlatBS900.StdBSConfApl Shared Function GetConnactionString(ByVal Motor As Interop.ErpBS900.ErpBS) As String Dim connString As String = String.Empty Try InstanciaPlataforma(Motor) connString = Plataforma.BaseDados.DaConnectionString("PRI" & Plataforma.Contexto.Empresa.CodEmp, Plataforma.Contexto.Instancia) Dim startIndex As Integer = connString.IndexOf("User") connString = connString.Substring(startIndex, connString.Length - startIndex) Plataforma.FechaPlataformaEx() Return connString Catch ex As Exception Throw End Try End Function Shared Function InstanciaPlataforma(ByVal Motor As Interop.ErpBS900.ErpBS) As Interop.StdPlatBS900.StdPlatBS Try ObjConfApl = New Interop.StdPlatBS900.StdBSConfApl Plataforma = New Interop.StdPlatBS900.StdPlatBS 'Plataforma.AbrePlataformaEmpresaIntegrador() ObjConfApl.AbvtApl = "GCP" 'm_strApl ObjConfApl.Instancia = Motor.Contexto.Instancia ObjConfApl.Utilizador = Motor.Contexto.UtilizadorActual ObjConfApl.PwdUtilizador = Motor.Contexto.PasswordUtilizadorActual 'varios testes de ligação ###este já não é valido para a versão 9.15 apenas para a 8.10 e funciona na 8.10############# 'Plataforma.AbrePlataformaEmpresaIntegrador(Motor.Contexto.CodEmp, Nothing, ObjConfApl, Interop.StdBE900.EnumTipoPlataforma.tpProfissional) '###############Algumas opções válidas que não estão a funcionar################## 'varios testes 'Plataforma.AbrePlataformaEmpresa(Motor.Contexto.CodEmp, Nothing, ObjConfApl, Interop.StdBE900.EnumTipoPlataforma.tpProfissional, ObjConfApl.PwdUtilizador) 'varios testes Plataforma.AbrePlataformaPRIEMPRE(Nothing, ObjConfApl, Interop.StdBE900.EnumTipoPlataforma.tpProfissional, ObjConfApl.PwdUtilizador) 'varios testes Return Plataforma Catch ex As Exception Throw New Exception("InstanciaPlataforma:" & ex.Message) End Try End Function End Class '##################################################################################### Se colocar, na opção de Password se colocar “ObjConfApl.PwdUtilizador” ou qualquer outra password em string “xpto” dá erro de password da plataforma errada. Se colocar “nothing” na password, dá erro de não ter licença nos motores, confirmei e tenho a licença técnica e a licença dos motores está ativa. Se alguem conseguir ajudar, agradecia muito Obrigado, Desde já Se este não era o local correcto, a colocar a questão, porfavor indiquem me onde posso colocar. Obrigado Edited December 1, 2015 at 05:21 PM by Miguel Alves Neto Link to comment Share on other sites More sharing options...
Muryllo Posted December 1, 2015 at 04:57 PM Report Share #590279 Posted December 1, 2015 at 04:57 PM Boas, Mete o teu código em highlighting por favor. Link to comment Share on other sites More sharing options...
Helder Meneses Posted May 17, 2016 at 06:51 PM Report Share #596438 Posted May 17, 2016 at 06:51 PM Boa tarde, se servir de ajuda, também tive este problema, e bastou colocar a indicação da licença minima da aplicação: objConfApl.LicVersaoMinima = "9.00" e assim já funciona... Link to comment Share on other sites More sharing options...
sapuser Posted May 23, 2016 at 07:24 AM Report Share #596555 Posted May 23, 2016 at 07:24 AM eu uso este codigo e funciona: objConfApl = New Interop.StdPlatBS900.StdBSConfApl objConfApl.AbvtApl = "GCP" objConfApl.Instancia = "default" objConfApl.Utilizador = "utilizador" objConfApl.PwdUtilizador = "password" objConfApl.LicVersaoMinima = "9.00" objPlat = New Interop.StdPlatBS900.StdPlatBS objPlat.AbrePlataformaEmpresa(bso.Contexto.CodEmp, Nothing, objConfApl, 1, "") objPlat.Mapas.Inicializar("GCP") espero ter ajudado Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now