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

关键字 'and' 附近有语法错误。
select count(*) from  bomakeappointment  where  and CompanyId in (select CompanyId from uscompany where Status>0 AND UserType>0)

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

异常详细信息: System.Exception: 关键字 'and' 附近有语法错误。
select count(*) from  bomakeappointment  where  and CompanyId in (select CompanyId from uscompany where Status>0 AND UserType>0)

源错误:


行 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  and CompanyId in (select CompanyId from uscompany where Status>0 AND UserType>0) ]
   XMLSDatabase.XMLSMSSql.ExecuteScalar(String strSql) +275
   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.XMLSMethodElseDefault.Execute(XMLSShell shell, XMLSNode node) +47
   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) +1564
   XMLS.XMLSShell.Run(String method) +178
   XMLS.XMLSHtml.Run(XMLSShell shell, XMLSNode node) +1738
   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