delphi dbgridnavigation

hi iam using delphi7 with ado2.5 and access database.i am using dbgrid and able to view the data from database.But iam not able to edit the value in dbgrid and save it to database.iam not using componets to connect database.i have connected through coding to connect to database and i am using adodb.recorset for moving the record.any ony help me out to edit in dbgrid and save the data to the access database using codes.if u send me sample codes it will be more useful to me.thank u
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

can you write to the community support to transfer this question to the delphi section under programming->languages->delphi ?
Please note that Bhagyesht is right: this question will find more experts that can answer it if you move it to Programming/Delphi.

However, it found me. =)

You can try something like this:

// Num and Vers are strings holding values for the Number and Version fields of the database.
// Together, these two field form a unique key.

//Connect to the DB through ADO. Then:

{ Find the record to modify: }
FoundIt := ADODataSet.Locate('Number;Version',VarArrayOf([Num, Vers]), []);

if FoundIt then
{ Put the data set into edit mode: }

{ Change the value of the "IsDirty" field to 'false' (This is from quite an odd programme where
the DB was not actually a DB but an Excel sheet, so, this boolean value is also stored as a string, for formatting problems with Excel): }
   ADODataSet['Is Dirty']:='false';

{ Record the change in the DataBase. Without this, changes take no effect: }
end; { if }

Hope it helps:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JackNaif: Thanks for backing me! but it often is not the case that experts like you (delphi persons) work in the programming section. usually JOA fellas like me are here ;-).
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

You're welcome. But what does "JOA" mean?
JOA:jack of all ;-)

So that it is! Well... I guess I'm kinda a little bit of that too...
I humbly raise my hand for the points...
I second JackNaif
Bhagyesh Trivedi
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Multimedia Programming

From novice to tech pro — start learning today.