Menu

#4 the question of the close connection

open
nobody
None
5
2007-02-26
2007-02-26
Anonymous
No

Today I use myoledb to connect mysql,connect is success.but when I close the connecton in code the actual connection isn't closed .I can see the connection is exist in the mysql's connector list Why???
here is my code:

void main()
{
OleDBConnection cnn = new OleDBConnection();
cnn.ConnectionString = "Provider='MySQLProv';
Data Source= nms;UserID=root;Password=root";
//Open the Connection
cnn.Open();
//Close the opened connection
cnn.Close();
}

this code is write with c#. My MySQL server is in my localmachine. I used MySQL's vision is 5.0.

help??

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.