private: System::Void button_Load_Click(System::Object^ sender, System::EventArgs^ e) {
//连接数据库文件
String ^ conStr = "Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source=grocertogo.mdb";
OleDbConnection con = gcnew OleDbConnection;
con.ConnectionString = conStr;
}
};
error C2664: “System::Data::OleDb::OleDbConnection::OleDbConnection(System::String ^)”: 不能将参数 1 从“System::Data::OleDb::OleDbConnection ^”转换为“System::String ^”
------解决方案--------------------------------------------------------
gcnew OleDbConnection;是什么东西,是OleDbConnection 类型还string类型
------解决方案--------------------------------------------------------
本来是想用 new OleDbConnection;的,但编译不过去,提示要用gcnew。
------解决方案--------------------------------------------------------
求助……求救助……
------解决方案--------------------------------------------------------
求助……求救助……