Prezados, tenho uma consulta em sql que não retorna o registro. Todos os campos são string.
"SELECT * FROM TblObsrelacaoMisturas where diagnostico= """ & TxtCodimuno & """" & " and concentracao= """ & TxtCodilui & """" & " and volume= """ & TxtCodvol & """" & " and itens like " & "'" & "*" & NumeroItens & "*" & "'" & " and porcento= """ & ComPorcentagem & """"
Segue resultado da janela imediata:
SELECT * FROM TblObsrelacaoMisturas where diagnostico= "AP5" and concentracao= "y1" and volume= "5" and itens like '*2*' and porcento= ""
Dá certo até o campo itens. O que estou errando?
Obrigado
"SELECT * FROM TblObsrelacaoMisturas where diagnostico= """ & TxtCodimuno & """" & " and concentracao= """ & TxtCodilui & """" & " and volume= """ & TxtCodvol & """" & " and itens like " & "'" & "*" & NumeroItens & "*" & "'" & " and porcento= """ & ComPorcentagem & """"
Segue resultado da janela imediata:
SELECT * FROM TblObsrelacaoMisturas where diagnostico= "AP5" and concentracao= "y1" and volume= "5" and itens like '*2*' and porcento= ""
Dá certo até o campo itens. O que estou errando?
Obrigado