Connect to Access DB
yuibox March 22nd, 2008
Took me a while to actually find the right syntax to connect to an Acces DB in c++. Since every CLR tutorial is in c# and VB, here it goes :[source:C++]private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
//connects to database
OleDbConnection ^ m_OleDbConnection = gcnew OleDbConnection(”Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\PLUSweld.mdb”);
m_OleDbConnection->Open();
//m_OleDBConnection->Close(); to close it
} [/source]
Stumble it!
Recent Comments