MY SQL error 'Connection must be opened' (C# ,ASP.net ,MY Sql ,MY SQL direct.net drivers version 2.8)

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Mnet

MY SQL error 'Connection must be opened' (C# ,ASP.net ,MY Sql ,MY SQL direct.net drivers version 2.8)

Post by Mnet » Wed 04 May 2005 21:57

I am running few queries in a transaction in an ASP.net web application using C# and MYSQL and MY SQL DIRECT.net Drivers.When i begin a transaction i open up a connection in C# code and use the same connection string for all the other queries within the transaction.At the end of the transaction i close the connection.

I am running into an error that occurs randomly....Sometimes mid way between the transaction i get Folowing error Connection must be opened.
I am surprised as to why sometimes the entire transaction goes through smoothly whereas sometimes i get error 'Connection must be opened'....as the database connection is closed only at end of transaction.
Is it a driver related issue.Please anybody can let me know as to why its happening

I am running windows 2003 /My sql version 4.0.1 /Drivers :MySQlDirect.net 2.8 version

ERROR IS :
Connection must be opened.
at

CoreLab.MySql.MySqlConnection.i()
at CoreLab.MySql.MySqlCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2,

Int32 A_3)
at CoreLab.Common.DbCommandBase.b(CommandBehavior A_0)
at CoreLab.Common.DbCommand.ExecuteReader()
at CoreLab.Common.DbCommandBase.ExecuteNonQuery()
at CFarmsLib.DataAccess.DataAccessBase.ExecuteNonQuery(String cmdText)

Serious

Post by Serious » Thu 05 May 2005 07:16

Please send us small test project if possible to reproduce the problem; it is desirable to use 'test' schema objects, otherwise include definition of your own database objects. Do not use third party components.

If it is impossible for you to create test project please send us a piece of your code where the error occurs.

Post Reply