• 不支持关键字: “userid”。


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


    不支持关键字: “userid”

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

    异常详细信息: System.ArgumentException: 不支持关键字: “userid”

    源错误:

     

    24:         {

    25:

    26:             return objBusinessBase.GetDataToDataSet("usp_GETCUSTOMERS").Tables[0];

    27:

    28:         }


    源文件: d:\Backup\Visual Studio 2010\WebSites\WebSite19\App_Code\Customers.cs   : 26 

    堆栈跟踪:

     

    [ArgumentException: 不支持关键字: “userid”]

       System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +5055124

      System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) +98

      System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +64

      System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +24

       System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +150

      System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +59

       System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +4

      System.Data.SqlClient.SqlConnection..ctor(String connectionString) +26

       Insus.NET.Base.a() +269

      Insus.NET.Base.a(String A_0, SqlParameter[] A_1) +26

       Insus.NET.Base.ExecuteProcedure(String procedureName, DataSet& dataSet) +90

      Insus.NET.BusinessBase.GetDataToDataSet(String procedureName) +54

      Insus.NET.Customers.GetCustomers() in d:\Backup\Visual Studio 2010\WebSites\WebSite19\App_Code\Customers.cs:26

      ShowCustomers.Data_Binding() in d:\Backup\Visual Studio 2010\WebSites\WebSite19\ShowCustomers.aspx.cs:21

      ShowCustomers.Page_Load(Object sender, EventArgs e) in d:\Backup\Visual Studio 2010\WebSites\WebSite19\ShowCustomers.aspx.cs:16

       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14

      System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35

      System.Web.UI.Control.OnLoad(EventArgs e) +91

      System.Web.UI.Control.LoadRecursive() +74

      System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

     


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

      

    昨天一位网友测试Insus.NeT博客视频实例时,出现如上Error。因时间关系没有及时给他回复,结果他自己解决问题,是因为在写数据库连接字符串时,没有注意到细节。把User Id=sa,写成userid=sa了。

  • 相关阅读:
    Mondriaan's Dream POJ
    H
    Superdoku Kattis
    Corn Fields POJ
    旅行的意义 Gym
    G
    J
    Welcome Party ZOJ
    redis入门到精通系列(三):key的通用操作和redis内部db的通用操作
    redis入门到精通系列(二):redis操作的两个实践案例
  • 原文地址:https://www.cnblogs.com/insus/p/2080418.html
Copyright © 2020-2023  润新知