这是什么原因? MyConnection=New SQLConnection(System.Configuration.ConfigurationSettings.AppSettings["data"]); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 to zwztu,按照您说的,我改了但出现如下错误:编译错误 说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。 编译器错误信息: BC30311: 类型“System.Collections.Specialized.NameValueCollection”的值无法转换为“String”。源错误: 行 21: 'Config = Context.GetConfig("appSettings")行 22: 'MyConnection = New SQLConnection(Config("strConn"))行 23: MyConnection=New SQLConnection(System.Configuration.ConfigurationSettings.AppSettings["strConn"]);行 24: 行 25: ' MyConnection = New SqlConnection("server=WEBOPENOUT\NetSDK;UID=sa;PWD=;DATABASE=zcgmMIS") 源文件: c:\inetpub\wwwroot\zcgmMIS\WebForm1.aspx 行: 23 显示详细的编译器输出:C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.0.3705\vbc.exe" /t:library /utf8output /R:"c:\winnt\assembly\gac\system\1.0.3300.0__b77a5c561934e089\system.dll" /R:"c:\winnt\assembly\gac\system.data\1.0.3300.0__b77a5c561934e089\system.data.dll" /R:"c:\winnt\assembly\gac\system.enterpriseservices\1.0.3300.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /R:"c:\winnt\microsoft.net\framework\v1.0.3705\temporary asp.net files\zcgmmis\8a758207\b07fd1c7\assembly\dl\0c972c0d\707f32a5_88f5c201\zcgmmis.dll" /R:"c:\winnt\assembly\gac\system.xml\1.0.3300.0__b77a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\system.web.services\1.0.3300.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\winnt\assembly\gac\system.drawing\1.0.3300.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\winnt\microsoft.net\framework\v1.0.3705\temporary asp.net files\zcgmmis\8a758207\b07fd1c7\qzclnjbn.dll" /R:"c:\winnt\microsoft.net\framework\v1.0.3705\temporary asp.net files\zcgmmis\8a758207\b07fd1c7\hgidbxqc.dll" /R:"c:\winnt\assembly\gac\system.web\1.0.3300.0__b03f5f7f11d50a3a\system.web.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files\zcgmmis\8a758207\b07fd1c7\ates7w_j.dll" /D:DEBUG=1 /debug+ "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files\zcgmmis\8a758207\b07fd1c7\ates7w_j.0.vb"Microsoft (R) Visual Basic .NET 编译器版本 7.00.9466用于 Microsoft (R) .NET 框架版本 1.00.3705版权所有 (C) Microsoft Corporation 1987-2001。保留所有权利。c:\inetpub\wwwroot\zcgmMIS\WebForm1.aspx(23) : error BC30311: 类型“System.Collections.Specialized.NameValueCollection”的值无法转换为“String”。 MyConnection=New SQLConnection(System.Configuration.ConfigurationSettings.AppSettings["strConn"]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c:\inetpub\wwwroot\zcgmMIS\WebForm1.aspx(23) : error BC30203: 需要标识符。 MyConnection=New SQLConnection(System.Configuration.ConfigurationSettings.AppSettings["strConn"]); ~~~~~~~~~ Config("strConn")你能保证这个东西就是合法的字符串??如果是你想要的字符串,因为你config是个hashtable也得加上toString() to lilyfirstone(永恒......) 我还不懂,请问应该如何加上tostring()源码是这样的: Dim MyConnection As SQLConnection Dim Config as HashTable Config = Context.GetConfig("appSettings") MyConnection = New SQLConnection(Config("strConn")) MyConnection.Open() 求网页在线聊天的实现思路!!!! 将Excel导入到我的sql server数据库,急,,,,在线等 GirdView是否可以隐藏 header和footer? Checkbox 如何控制checkboxlist? Aspnet 中都有那些全局变量? 关于用后台代码控制图片载入时大小的问题(在线等) 请问100并发量,访问量一般达到多少。 关于OWC11的问题 关于datalist 那位 知道ACT测试过程中产生的套接字错误的原因 asp.net c#中能不能对mouse事件进行处理 这个问题你们一定搞得好
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。 编译器错误信息: BC30311: 类型“System.Collections.Specialized.NameValueCollection”的值无法转换为“String”。源错误: 行 21: 'Config = Context.GetConfig("appSettings")
行 22: 'MyConnection = New SQLConnection(Config("strConn"))
行 23: MyConnection=New SQLConnection(System.Configuration.ConfigurationSettings.AppSettings["strConn"]);
行 24:
行 25: ' MyConnection = New SqlConnection("server=WEBOPENOUT\NetSDK;UID=sa;PWD=;DATABASE=zcgmMIS")
源文件: c:\inetpub\wwwroot\zcgmMIS\WebForm1.aspx 行: 23 显示详细的编译器输出:
C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.0.3705\vbc.exe" /t:library /utf8output /R:"c:\winnt\assembly\gac\system\1.0.3300.0__b77a5c561934e089\system.dll" /R:"c:\winnt\assembly\gac\system.data\1.0.3300.0__b77a5c561934e089\system.data.dll" /R:"c:\winnt\assembly\gac\system.enterpriseservices\1.0.3300.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /R:"c:\winnt\microsoft.net\framework\v1.0.3705\temporary asp.net files\zcgmmis\8a758207\b07fd1c7\assembly\dl\0c972c0d\707f32a5_88f5c201\zcgmmis.dll" /R:"c:\winnt\assembly\gac\system.xml\1.0.3300.0__b77a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\system.web.services\1.0.3300.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\winnt\assembly\gac\system.drawing\1.0.3300.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\winnt\microsoft.net\framework\v1.0.3705\temporary asp.net files\zcgmmis\8a758207\b07fd1c7\qzclnjbn.dll" /R:"c:\winnt\microsoft.net\framework\v1.0.3705\temporary asp.net files\zcgmmis\8a758207\b07fd1c7\hgidbxqc.dll" /R:"c:\winnt\assembly\gac\system.web\1.0.3300.0__b03f5f7f11d50a3a\system.web.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files\zcgmmis\8a758207\b07fd1c7\ates7w_j.dll" /D:DEBUG=1 /debug+ "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files\zcgmmis\8a758207\b07fd1c7\ates7w_j.0.vb"
Microsoft (R) Visual Basic .NET 编译器版本 7.00.9466
用于 Microsoft (R) .NET 框架版本 1.00.3705
版权所有 (C) Microsoft Corporation 1987-2001。保留所有权利。c:\inetpub\wwwroot\zcgmMIS\WebForm1.aspx(23) : error BC30311: 类型“System.Collections.Specialized.NameValueCollection”的值无法转换为“String”。 MyConnection=New SQLConnection(System.Configuration.ConfigurationSettings.AppSettings["strConn"]);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\inetpub\wwwroot\zcgmMIS\WebForm1.aspx(23) : error BC30203: 需要标识符。 MyConnection=New SQLConnection(System.Configuration.ConfigurationSettings.AppSettings["strConn"]);
~~~~~~~~~
你能保证这个东西就是合法的字符串??如果是你想要的字符串,因为你config是个hashtable
也得加上toString()
Dim MyConnection As SQLConnection
Dim Config as HashTable
Config = Context.GetConfig("appSettings")
MyConnection = New SQLConnection(Config("strConn"))
MyConnection.Open()