“/”应用程序中的服务器错误。

关键字 'and' 附近有语法错误。
select count(*) from  bomakeappointment  where  Title= and level=0 and  CompanyId in (16,18,20,21,22,24,25,32,35,39,102,123,144,145,151,154,158,161,162,165,167,170,172,173,177,180,183,190,192,198,202,205,208,215,216,221,222,229,230,235,952,958,963,966,995,996,1006,1008,1028,1243,1244,1299,1385,1437,1474,1488,1500,1665,1672,1673,1674,1675,1690,1698,1709,1710,1716,1717,1718,1721,1744,1747,1755,1756,1758,1760,1762,1763,1764,1769,1770,1777,1781,1783,1785,1788,1789,1791,1795,1796,1798,1801,1812,1823,1832,1842,1843,1846,1854,1855,1858,1860,1861,1863,1872,1873,1874,1879,1880,1883,1897,1898,1899,1903,1906,1928,1942,1946,1965,1966,1969,1970,1972,1977,1985,1997,2009,2012,2014,2024,2026,2040,2041,2048,2051,2053,2054,2055,2056,2057,2058,2059,2060,2065,2067,2068,2070,2071,2074,2075,2085,2088,2089,2093,2094,2095,2097,2098,2100,2102,2105,2106,2108,2114,2116,2117,2119,2122,2123,2127,2128,2130,2132,2134,2135,2136,2138,2139,2142,2144,2145,2146,2148,2151,2157,2163,2168)

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Exception: 关键字 'and' 附近有语法错误。
select count(*) from  bomakeappointment  where  Title= and level=0 and  CompanyId in (16,18,20,21,22,24,25,32,35,39,102,123,144,145,151,154,158,161,162,165,167,170,172,173,177,180,183,190,192,198,202,205,208,215,216,221,222,229,230,235,952,958,963,966,995,996,1006,1008,1028,1243,1244,1299,1385,1437,1474,1488,1500,1665,1672,1673,1674,1675,1690,1698,1709,1710,1716,1717,1718,1721,1744,1747,1755,1756,1758,1760,1762,1763,1764,1769,1770,1777,1781,1783,1785,1788,1789,1791,1795,1796,1798,1801,1812,1823,1832,1842,1843,1846,1854,1855,1858,1860,1861,1863,1872,1873,1874,1879,1880,1883,1897,1898,1899,1903,1906,1928,1942,1946,1965,1966,1969,1970,1972,1977,1985,1997,2009,2012,2014,2024,2026,2040,2041,2048,2051,2053,2054,2055,2056,2057,2058,2059,2060,2065,2067,2068,2070,2071,2074,2075,2085,2088,2089,2093,2094,2095,2097,2098,2100,2102,2105,2106,2108,2114,2116,2117,2119,2122,2123,2127,2128,2130,2132,2134,2135,2136,2138,2139,2142,2144,2145,2146,2148,2151,2157,2163,2168)

源错误:


行 26:                 XMLSShell shell = new XMLSShell(environ);
行 27:                 //执行脚本
行 28:                 shell.Run();
行 29:             }
行 30:             //输出

源文件: d:\www\wwwroot\default.ashx    行: 28

堆栈跟踪:


[Exception: 关键字 'and' 附近有语法错误。
select count(*) from  bomakeappointment  where  Title= and level=0 and  CompanyId in (16,18,20,21,22,24,25,32,35,39,102,123,144,145,151,154,158,161,162,165,167,170,172,173,177,180,183,190,192,198,202,205,208,215,216,221,222,229,230,235,952,958,963,966,995,996,1006,1008,1028,1243,1244,1299,1385,1437,1474,1488,1500,1665,1672,1673,1674,1675,1690,1698,1709,1710,1716,1717,1718,1721,1744,1747,1755,1756,1758,1760,1762,1763,1764,1769,1770,1777,1781,1783,1785,1788,1789,1791,1795,1796,1798,1801,1812,1823,1832,1842,1843,1846,1854,1855,1858,1860,1861,1863,1872,1873,1874,1879,1880,1883,1897,1898,1899,1903,1906,1928,1942,1946,1965,1966,1969,1970,1972,1977,1985,1997,2009,2012,2014,2024,2026,2040,2041,2048,2051,2053,2054,2055,2056,2057,2058,2059,2060,2065,2067,2068,2070,2071,2074,2075,2085,2088,2089,2093,2094,2095,2097,2098,2100,2102,2105,2106,2108,2114,2116,2117,2119,2122,2123,2127,2128,2130,2132,2134,2135,2136,2138,2139,2142,2144,2145,2146,2148,2151,2157,2163,2168)]
   XMLSDatabase.XMLSMSSql.ExecuteScalar(String strSql) +276
   XMLSClass.XMLSMethodQueryPager.Execute(XMLSShell shell, XMLSNode node) +1036
   XMLS.XMLSScript.Process(XMLSShell shell, XMLSNode node) +894
   XMLS.XMLSScript.Run(XMLSShell shell, XMLSNode node) +234
   XMLSClass.XMLSMethodIfDefault.Execute(XMLSShell shell, XMLSNode node) +256
   XMLS.XMLSScript.Process(XMLSShell shell, XMLSNode node) +125
   XMLS.XMLSScript.Run(XMLSShell shell, XMLSNode node) +234
   XMLS.XMLSShell.Run(String method) +231
   XMLS.XMLSHtml.Run(XMLSShell shell, XMLSNode node) +1562
   XMLS.XMLSShell.Run(String method) +178
   XMLS.XMLSHtml.Run(XMLSShell shell, XMLSNode node) +1735
   XMLS.XMLSShell.Run() +909
   Handler.ProcessRequest(HttpContext context) in d:\www\wwwroot\default.ashx:28
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +814
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +132
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.8.3815.0