-4
我已经在VB 2010中建立了连接字符串,很容易理解,但我无法弄清楚里面发生了什么。可以请人解释这段代码?
private: System::Void button1_Click(System::Object^ sender,System::EventArgs^ e) {
MySqlConnection^ con =gcnew MySqlConnection("server=localhost;port=3306;userid=root;password=themohal123;database=myfirstdb");
try
{
con->Open();
MessageBox::Show("Connection Successful");
con->Close();
}
catch (Exception^ ex)
{
MessageBox::Show("Connection Not Successful"+ ex);
}
}
对于初学者来说,它不是VB代码 – Plutonix