question about open and close of MySqlConnection
Posted by:
Martin Wang
Date: September 04, 2014 02:07AM
hi
i'd like to ask a question.
MySqlConnection connection = newMySqlConnection(stringConnection);
MySqlCommand cmd = connection.CreateCommand();
connection.Open();
and i have a try catch. accoding to your opinion, i should put connection.Close() in the block of try,or outside of block of try?
according to you,if i open the connection and do not close,is it bad?or i open 2 times(using different istancse,like connection1 and connecton2),is it ok?
thank u very much
best regards
martin
Subject
Written By
Posted
question about open and close of MySqlConnection
September 04, 2014 02:07AM
September 12, 2014 05:19PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.