错误代码为:
Server Error in '/test' Application.
--------------------------------------------------------------------------------Method not found: Void System.Threading.WaitCallback..ctor(System.Object, IntPtr).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.MissingMethodException: Method not found: Void System.Threading.WaitCallback..ctor(System.Object, IntPtr).Source Error:
Line 66:
Line 67: SqlCommand cmd=new SqlCommand("select * from id",DbConn);
Line 68: DbConn.Open();
Line 69: SqlDataReader DR=cmd.ExecuteReader( CommandBehavior.CloseConnection );
Line 70: DR.Read();
Source File: e:\web\weba\test\webform1.aspx.cs Line: 68 Stack Trace:
[MissingMethodException: Method not found: Void System.Threading.WaitCallback..ctor(System.Object, IntPtr).]
System.Data.SqlClient.SqlConnection.Open() +761
test.WebForm1.Button1_Click(Object sender, EventArgs e) in e:\web\weba\test\webform1.aspx.cs:68
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +660
Server Error in '/test' Application.
--------------------------------------------------------------------------------Method not found: Void System.Threading.WaitCallback..ctor(System.Object, IntPtr).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.MissingMethodException: Method not found: Void System.Threading.WaitCallback..ctor(System.Object, IntPtr).Source Error:
Line 66:
Line 67: SqlCommand cmd=new SqlCommand("select * from id",DbConn);
Line 68: DbConn.Open();
Line 69: SqlDataReader DR=cmd.ExecuteReader( CommandBehavior.CloseConnection );
Line 70: DR.Read();
Source File: e:\web\weba\test\webform1.aspx.cs Line: 68 Stack Trace:
[MissingMethodException: Method not found: Void System.Threading.WaitCallback..ctor(System.Object, IntPtr).]
System.Data.SqlClient.SqlConnection.Open() +761
test.WebForm1.Button1_Click(Object sender, EventArgs e) in e:\web\weba\test\webform1.aspx.cs:68
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +660
解决方案 »
- ASPXGridView如何設置固定高度
- 高手帮忙啊 关于session存放dataset的问题
- 配置错误
- 在页面上要输出“大类”/“小类”,用表单输出怎么控制啊,或者有更好的方法,谢谢!(c#)
- 应该是很简单的问题,但就是很奇怪,请高手帮帮忙吧
- 想学XML,不知从何下手,请指点!
- dreamweaver中的asp.net,急~~~~~~~~~~~~~~~~
- 大家谈谈接口得使用、接口得优缺点等!!
- 幻灯片问题
- 由按钮连接到其他的网页!
- treeview高难度问题,欢迎大家近来讨论,
- 不要怪我浪费分,这个问题我实在没搞明白,岂是一个"菜"形容得了,老问题,上传文件到SQL数据库varbinary字段中,有事没事再下载下来看看,其实
try:
SqlConnection DbConn=new SqlConnection("data source=pe;initial catalog=test;persist security info=False;user id=sa;workstation id=pe;packet size=4096");
SqlCommand cmd=new SqlCommand("select * from a",DbConn);
cmd.Connection.Open();
...
DbConn=new SqlConnection("data source=pe;initial catalog=test;persist security info=False;user id=sa;workstation id=pe;packet size=4096");
DbConn.Open();
SqlCommand cmd=new SqlCommand("select * from a",DbConn);
连接串无误,数据库没问题!
"Data Source=pe;database=test;user id=sa"
DbConn.Provider = "SQLOleDb"
如果你是sqlserver的话