I’m having trouble accessing a dataset. I’ve pulled data from an Access database (successfully I think) but I’m now having trouble accessing the data. I think it’s a syntax problem. The errors I’m getting are varied, but the current one is: “error C3867: ‘System::Object::ToString’: function call missing argument list; use ‘&System::Object::ToString’ to create a pointer to member”
Am I attempting this correctly?
ds = gcnew DataSet;
con = gcnew OleDb::OleDbConnection;
con->ConnectionString = dbProvider + dbSource;
con->Open();
sql = "SELECT * FROM Table_Gateway";
da = gcnew OleDb::OleDbDataAdapter(sql,con);
da->Fill(ds, "Gateway");
con->Close();
ds_gw = gcnew DataTable;
ds_gw->TableName = "Gateways";
ds->Tables->Add(ds_gw);
dr = ds_gw->Rows[0];
errBox->AppendText(dr->default["Gateway_UID"]->ToString);
1 Answer