0
Good afternoon!
We are finishing a panel that will bring the results of an SQL in an ASP page. We already have two finished panels that are pulling the results perfectly. Only one of the panels does not bring the result with the SELECT we use, although when played in SQL SERVER returns the correct value. Only in ASP running that no. We tried some alternatives, but nothing. It follows excerpt of the code:
strSQL = " SELECT count(solid) AS ENCERRADOS "
strSQL = strSQL & " FROM SOLICITACAO S "
strSQL = strSQL & " INNER JOIN USUARIO U ON (S.UsuIdReclamante = U.UsuID) "
strSQL = strSQL & " INNER JOIN FilhoPai f on u.usuid = f.UsuIDFilho "
strSQL = strSQL & " INNER JOIN Usuario ux on ux.UsuID = f.UsuIDPai "
strSQL = strSQL & " INNER JOIN Usuario ur on ur.UsuID = s.UsuIDResponsavel "
strSQL = strSQL & " INNER JOIN Usuario ug on ur.usuIDGrupo = ug.usuID "
strSQL = strSQL & " WHERE SolData BETWEEN '2015-07-16 00:00:00' and '2015-07-16 23:59:59' "
strSQL = strSQL & " AND ug.usunome = 'Service Desk - 1º Nível TI' "
strSQL = strSQL & " AND s.usuidultimoresp = '2721184' "
strSQL = strSQL & " AND (SOLSTATUS IN ('7','9')) "
Set BUSCA3 = Server.CreateObject("ADODB.RecordSet")
BUSCA3.Open strSQL, Conexao, 1
And where the result is displayed:
<p class="textoPainel"><%= BUSCA3("ENCERRADOS")%></p>
In the direct query in the database, returns 22 the value. In ASP returns 0.
The connection used in the page and the database pointed in the application is the same as in the database?
– jefissu