Hi i have just shifted from ADODB to Ado.net for MySql. I am new to this system.
After going thru the forums i have defined the connection, adapter, reader , command.
I defined in all this in a class, i am calling that class in every form so that i dont have to created the same for every form. I have written things like following
- public MySqlConnection conn;
- public MySqlCommand cmd;
- public MySqlDataReader dr;
- public MySqlDataAdapter da;
"There is already an open DataReader associated with this Command which must be closed"
So i searched on forum, but i being new to this things , i request you to please kindly suggest how i can close connect, open connected and how i should declear variables in a class.
I will be very thankful for this in advance. i am developing a customized software , so asap help is very much appriciated.
Thank you


Ankit SharmaRank #141 · 16.1K reputationPosted Oct 5, 2017, 2:13 AM EDT
Gautam ParmarRank #2,471 · 568 reputationPosted Oct 5, 2017, 2:35 AM EDT
Kedar Pawgi135 reputationPosted Oct 5, 2017, 5:19 AM EDT
Ankit SharmaRank #141 · 16.1K reputationPosted Oct 5, 2017, 5:39 AM EDT
Kedar Pawgi135 reputationPosted Oct 5, 2017, 6:05 AM EDT