M
Mochuelo
Hi,
My previous post may be too confusing. This is the idea of my doubt:
To do one single SELECT-type query, or one single INSERT-type query, I
have no problems.
To do multiple queries in a row, which objects can I reuse? Do I need
to instantiate a new connection (MySqlConnection) object, a new
command (MySqlCommand) object, and a new data reader (MySqlDataReader)
object for each and every query? I guess this would work, but would it
would be optimum in terms of time and resources? I tend to think it
would not.
Can I at least reuse the connections? I hope the answer to this is
"yes".
Can I reuse an instance of MySqlCommand in two queries in a row? This
is where my serious doubts start.
Can I reuse an instance of MySqlDataReader, too?
Thanks for your help.
Mochuelo.
My previous post may be too confusing. This is the idea of my doubt:
To do one single SELECT-type query, or one single INSERT-type query, I
have no problems.
To do multiple queries in a row, which objects can I reuse? Do I need
to instantiate a new connection (MySqlConnection) object, a new
command (MySqlCommand) object, and a new data reader (MySqlDataReader)
object for each and every query? I guess this would work, but would it
would be optimum in terms of time and resources? I tend to think it
would not.
Can I at least reuse the connections? I hope the answer to this is
"yes".
Can I reuse an instance of MySqlCommand in two queries in a row? This
is where my serious doubts start.
Can I reuse an instance of MySqlDataReader, too?
Thanks for your help.
Mochuelo.