Internal error when loading a dropdown with SQL Server
Posted: Fri Jul 03, 2020 10:23 am
Hi.
I'm trying to load a dropdown with data from an external DB (SQL Server 11), but this error shows up and won't let me continue. I'm already using data from this DB in another form with another query, however, in this specific case, I have the error.
Can someone help me?
Thanks.
That's the query (in HeidiSQL it works just fine):
I'm trying to load a dropdown with data from an external DB (SQL Server 11), but this error shows up and won't let me continue. I'm already using data from this DB in another form with another query, however, in this specific case, I have the error.
Can someone help me?
Thanks.
That's the query (in HeidiSQL it works just fine):
Code: Select all
SELECT Forneced.fornecedor, PessoaFJ.RazaoSocial FROM dbo.forneced
JOIN PessoaFJ ON PessoaFJ.empresa = Forneced.emppessoa
AND PessoaFJ.filial = Forneced.FilPessoa
AND fornecedor = pessoa
WHERE PessoaFJ.indativo = 'S'
AND PessoaFJ.IndFisJur = 'J'
AND forneced.empresa = @%EMPRESA
AND Forneced.TipoTributacao = 31
ORDER BY fornecedor