[问题]MySQL 5.0.45 + ASP.net + C#: The connection is not Open

数据库服务和管理,MySQL/PostgreSQL/Oracle/Sybase 等
回复
jellylucky
帖子: 1
注册时间: 2008-07-09 15:14
送出感谢: 0
接收感谢: 0

[问题]MySQL 5.0.45 + ASP.net + C#: The connection is not Open

#1

帖子 jellylucky » 2008-07-09 15:20

向高手求教:
MySQL 5.0.45 + ASP.net + C#
当MySQL 5.0.45安装在Ubuntu 7.10 Desktop上的时候,没有问题。
当MySQL 5.0.45安装在Ubuntu 8.04 Server上的时候,打开网页时出现The connection is not Open的问题。详细信息如下:
The connection is not open.
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.InvalidOperationException: The connection is not open.

Source Error:

Line 169: }
Line 170: MySql.Data.MySqlClient.MySqlCommand objCommand = new MySql.Data.MySqlClient.MySqlCommand();
Line 171: MySql.Data.MySqlClient.MySqlTransaction objTran = this.objCon.BeginTransaction();
Line 172: objCommand.Connection = this.objCon;
Line 173: objCommand.Transaction = objTran;

Source File: e:\system\new system\dcsapp\dbl\dm.cs Line: 171

Stack Trace:

[InvalidOperationException: The connection is not open.]
MySql.Data.MySqlClient.MySqlConnection.BeginTransaction(IsolationLevel iso)
MySql.Data.MySqlClient.MySqlConnection.BeginTransaction()
DCSApp.DBL.DM.ExecuteDML(String[] strCommandSQL) in e:\system\new system\dcsapp\dbl\dm.cs:171
DCSApp.DBL.DM.ExecuteSQL(String strSelectSQL, DataSet& objResult) in e:\system\new system\dcsapp\dbl\dm.cs:401
DCSApp.MANAGE.clsUserList.IsValidUser(String strUserID, String strPassword) in e:\system\new system\dcsapp\manage\clsuserlist.cs:59
DCSApp.Default.cmdLogin_Click(Object sender, EventArgs e) in e:\system\new system\dcsapp\default.aspx.cs:122
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
回复

回到 “数据库管理”