Edit MS Access database using ADO


2003-12-21 11:56:46 PM
cppbuilder27
Hi everybody!!
database filename's 'db.mbd', that contains the table 'db1'.
I use:
- a TADOQuery named Query;
- a TDataSource name DataSource;
- a TDBGrid name DBGrid;
First, I open the DB as follow:
Query->ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=db.mdb;Mode=ReadWrite|Share Deny None;Persist Security
Info=False";Query->SQL->Add("SELECT * FROM db1");
DataSource->DataSet = Query;
DBGrid->DataSource = DataSource;
DBGrid->ReadOnly = true;
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("SELECT * FROM db1");
Query->Open();
And this works fine, I can modify my database editing the DBGrid, but
how can I select a particular cell or add a colomn to my DB?
Can anybody posts some code?
Thanks a lot!
Pat
--
remove AGR for reply