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;
-
the DB is conneced through DSN. Here everything is working fine. But while working i got error message like
"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