how can i connect MsAccess
-
hello, i am very new to VC++.Net. i am getting lots of bugs while working with MsAccess Database. Here is my code fragment. i used the Connection object from toolbox. so the connection is ok. i am able to retrieve the data. But i failed to modify (inserting, updating and deleting). DataSet *ds; OleDb::OleDbDataAdapter* adapter=new OleDb::OleDbDataAdapter("select prt_text,cut from spool",oleDbConnection1); oleDbConnection1->Open(); adapter->Fill(ds,"spool"); DataRow *dr=ds->Tables->Item[0]->Rows->get_Item(1); ds->Tables->Item[0]->Rows->Remove(dr); ds->AcceptChanges(); adapter->Update(ds,"spool"); oleDbConnection1->Close(); how do i delete a record, update a record and add a record. plz help me. Thank u in advance. regards, basheer.
-
hello, i am very new to VC++.Net. i am getting lots of bugs while working with MsAccess Database. Here is my code fragment. i used the Connection object from toolbox. so the connection is ok. i am able to retrieve the data. But i failed to modify (inserting, updating and deleting). DataSet *ds; OleDb::OleDbDataAdapter* adapter=new OleDb::OleDbDataAdapter("select prt_text,cut from spool",oleDbConnection1); oleDbConnection1->Open(); adapter->Fill(ds,"spool"); DataRow *dr=ds->Tables->Item[0]->Rows->get_Item(1); ds->Tables->Item[0]->Rows->Remove(dr); ds->AcceptChanges(); adapter->Update(ds,"spool"); oleDbConnection1->Close(); how do i delete a record, update a record and add a record. plz help me. Thank u in advance. regards, basheer.