19:47:17.832 - EXCEÇÃO NÃO TRATADA! Erro: 7000 Classe: Excecaoprograma Mesagem: Erro não classificado. Connectivity error: [Microsoft][ODBC SQL Server Driver]Query timeout expired SELECT L.ID IdLote, L.CodPro, L.Filial, L.LoteInterno, L.Lote, L.DataLote, sum(isnull(SL.Quant, 0)) QtdeDisponivel, L.Tonalidade, L.Bitola, L.Quantidade, L.VendeApenasSaldo, isnull((select left(Nome,40) from Item I (NOLOCK) where L.Tonalidade > 7 AND L.Tonalidade = I.Oid),'') NomeTonalidade, isnull((select left(Nome,40) from Item I (NOLOCK) where L.Bitola > 7 AND L.Bitola = I.Oid), '') NomeBitola, left (FI.Nome, 10) FilialImportadora, L.VendeSaldoOferta, (SELECT MAX(isnull(LP.QtdeOfertada,0) - isnull(LP.QtdeReservada,0) - isnull(LP.QtdeVendida,0)) FROM LotePromocao LP (NOLOCK) JOIN Promocao P (NOLOCK) ON P.OID = LP.RPROMOCAO WHERE LP.CodPro = L.CodPro AND LP.LoteInterno = L.LoteInterno AND GETDATE() BETWEEN P.INICIO AND P.TERMINO) QuantidadeOferta , (L.Quantidade * 0) QtdeReservadaPedido , L.Validade, i.ControleValidade, ISNULL(L.VendaMinima,0) AS VendaMinimaLote , L.PrecoCusto FROM Lote L (NOLOCK) JOIN SaidaLote SL (NOLOCK) on (SL.Atualizado=1 AND L.Filial = SL.Filial and L.CodPro = SL.CodPro and L.LoteInterno = SL.LoteInterno) LEFT join FilialCad FI (NOLOCK) on (FI.Oid = L.FilialImportadora) LEFT join ItemFilEst I (NOLOCK) on SL.FILIAL = I.FILIAL AND SL.CODPRO = i.CODPRO WHERE L.Filial = ?pcFilial and L.CodPro = ?pcCodpro and L.Situacao = 0 GROUP BY L.CodPro, L.Filial, L.LoteInterno, L.Lote, L.DataLote, L.Tonalidade, L.Bitola, L.Quantidade, L.VendeApenasSaldo, FI.Nome, L.VendeSaldoOferta, L.ID, L.Validade, i.ControleValidade, ISNULL(L.VendaMinima,0) , L.PrecoCusto UNION ALL SELECT L.ID IdLote, L.CodPro, L.Filial, L.LoteInterno, L.Lote, L.DataLote, sum(isnull(RL.Quant, 0)) * -1 QtdeDisponivel, L.Tonalidade, L.Bitola, L.Quantidade, L.VendeApenasSaldo, isnull((select left(Nome,40) from Item I (NOLOCK) where L.Tonalidade > 7 AND L.Tonalidade = I.Oid),'') NomeTonalidade, isnull((select left(Nome,40) from Item I (NOLOCK) where L.Bitola > 7 AND L.Bitola = I.Oid),'') NomeBitola, left (FI.Nome, 10) FilialImportadora, L.VendeSaldoOferta, 0.000 as QuantidadeOferta, SUM(CASE WHEN RL.NUMPED = 0 THEN RL.QUANT ELSE 0 END) QtdeReservadaPedido , L.Validade, i.ControleValidade, ISNULL(L.VendaMinima,0) AS VendaMinimaLote , L.PrecoCusto FROM Lote L (NOLOCK) LEFT join ReservaLote RL (NOLOCK) on (L.Filial = RL.Filial and L.CodPro = RL.CodPro and L.LoteInterno = RL.LoteInterno) LEFT join FilialCad FI (NOLOCK) on (FI.Oid = L.FilialImportadora) LEFT join ItemFilEst I (NOLOCK) on RL.FILIAL = I.FILIAL AND RL.CODPRO = i.CODPRO WHERE L.Filial = ?pcFilial and L.CodPro = ?pcCodpro GROUP BY L.CodPro, L.Filial, L.LoteInterno, L.Lote, L.DataLote, L.Tonalidade, L.Bitola, L.Quantidade, L.VendeApenasSaldo, FI.Nome, L.VendeSaldoOferta, L.ID , L.Validade, i.ControleValidade, ISNULL(L.VendaMinima,0) , L.PrecoCusto ORDER BY L.LoteInterno, L.Lote, L.ID, L.Validade Chamadas:Linha:1330 - _osql_sql_instanciaglobal._tratarerrossql - sql.prg Linha:545 - _osql_sql_instanciaglobal._dosql - sql.prg Linha:311 - _osql_sql_instanciaglobal.executarsqlretornanomecursor - sql.prg Linha:1198 - reservaloteitemlista._criarcursorsaldolote - reservaloteitemlista.prg Linha:784 - reservaloteitemlista._reservarautomaticamente - reservaloteitemlista.prg Linha:305 - reservaloteitemlista.definirdadositem - reservaloteitemlista.prg Linha:461 - controlelote.definirdadositem - controlelote.prg Linha:378 - controlelote._acharprodutossemlotereservado - controlelote.prg Linha:312 - controlelote.buscar - controlelote.prg Linha:4162 - orcamentovenda._buscar - orcamentobase.prg Linha:3918 - orcamentovenda._buscarorcamento - orcamentobase.prg Linha:3854 - orcamentovenda.buscar - orcamentobase.prg Linha:9082 - orcamentovenda_unit.testunit154 - orcamentovenda_unit.prg Linha:236 - orcamentovenda_unit.executarteste - testunitbase.prg Linha:1421 - executartesteunitarioprg - iniciartesteunitario.prg Linha:283 - iniciartesteunitario - iniciartesteunitario.prg Conteúdo: THROW lcMens Executando TestUnit: ORCAMENTOVENDA_UNIT.PRG Linha:410 - ON... - ctrlib.prg Linha:3970 - orcamentovenda._buscarorcamento - orcamentobase.prg Linha:3854 - orcamentovenda.buscar - orcamentobase.prg Linha:9082 - orcamentovenda_unit.testunit154 - orcamentovenda_unit.prg Linha:236 - orcamentovenda_unit.executarteste - testunitbase.prg Linha:1421 - executartesteunitarioprg - iniciartesteunitario.prg Linha:283 - iniciartesteunitario - iniciartesteunitario.prg Comando: lcListaChamada=oAgSistema.ObterFuncaoErro()