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

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

Postby Mnet » Wed 04 May 2005 21:57

I am running few queries in a transaction in an web application using C# and MYSQL and MY SQL 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' 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 2.8 version

Connection must be opened.

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)

Postby 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.

Return to dotConnect for MySQL