问题描述
可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。[ArgumentException:不支持关键字:“driver”。]System.Data.Common.DbConnectionOptions.ParseInternal(Hashtableparsetable,StringconnectionString,BooleanbuildChain,Hashtablesynonyms,BooleanfirstKey)+263System.Data.Common.DbConnectionOptions..ctor(StringconnectionString,Hashtablesynonyms,BooleanuseOdbcRules)+129System.Data.SqlClient.SqlConnectionString..ctor(StringconnectionString)+116System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(StringconnectionString,DbConnectionOptionsprevious)+46System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(StringconnectionString,DbConnectionPoolGroupOptionspoolOptions,DbConnectionOptions&userConnectionOptions)+201System.Data.SqlClient.SqlConnection.ConnectionString_Set(Stringvalue)+81System.Data.SqlClient.SqlConnection.set_ConnectionString(Stringvalue)+28System.Web.UI.WebControls.SqlDataSource.CreateConnection(StringconnectionString)+63System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArgumentsarguments)+215System.Web.UI.DataSourceView.Select(DataSourceSelectArgumentsarguments,DataSourceViewSelectCallbackcallback)+84System.Web.UI.WebControls.DataBoundControl.PerformSelect()+154System.Web.UI.WebControls.BaseDataBoundControl.DataBind()+99System.Web.UI.WebControls.GridView.DataBind()+24System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()+92System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()+100System.Web.UI.Control.EnsureChildControls()+134System.Web.UI.Control.PreRenderRecursiveInternal()+109System.Web.UI.Control.PreRenderRecursiveInternal()+233System.Web.UI.Control.PreRenderRecursiveInternal()+233System.Web.UI.Control.PreRenderRecursiveInternal()+233System.Web.UI.Control.PreRenderRecursiveInternal()+233System.Web.UI.Page.ProcessRequestMain(BooleanincludeStagesBeforeAsyncPoint,BooleanincludeStagesAfterAsyncPoint)+4437
解决方案
解决方案二:
偶然出现的吗?是不是数据库的连接出了问题
解决方案三:
把你代码贴出来看错误是不支持关键字driver检查有这个的地方