1
Good afternoon, I have created a method for creating an OF, all objects associated with OF are well instantiated with the exception of Gprbeofcomponent. Locally I can run the code, but on a production server, the following message appears:
Unable to cast COM Object of type 'System. __Comobject' to interface type 'Gprbe900.Gprbeofcomponent'. This Operation failed because the Queryinterface call on the COM Component for the interface with IID '{CE40951A-994A-4404-B354-F6E21175FBDB}' failed due to the following error: No supported such interface (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
Can help?
Private Function criaOrdemFabrico(ByVal artigoOF As String, ByVal alternativaOF As String, ByVal qtFabricada As Double, ByVal qtNecessaria As Double, ByVal qtOrdemFabrico As Double, ByVal isOFFilho As Boolean, ByVal OFPai As String, ByVal IDEnc As String, ByVal IDLinhaEncomenda As String, ByVal entidadeEnc As String, ByVal qtdEnc As Double) As GprBEOrdemFabrico
Dim oListaFichaTecnica As New DataTable
Dim oOrdemFabrico As New GprBEOrdemFabrico
Dim oOFArt As New GprBEOFArtigo
Dim oOFEnc As New GprBEOFEncomenda
Dim oOFOperacao As New GprBEOFOperacao
Dim oOFCentroTrabalho As New GprBEOFCentroTrabalho
Dim oOFComponente As New GprBEOFComponente
Hello Sergio. Thanks for the answer. It seems to me that this could be exactly my problem. As soon as you are available to test the solution on the production server, I will send you feedback.
– NunoFidalgo
The best way to thank you is to give a shout back. You are waiting for this feedback
– Sérgio Sereno
It seems fair Sergio. I just tested after your suggestion and let you know that the problem is over. Beginner’s fault. : ) Thank you for your support.
– NunoFidalgo