Solved

how to navigate in dbgrid

Posted on 2003-11-05
5
324 Views
Last Modified: 2010-04-05
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
0
Comment
Question by:abunectar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Expert Comment

by:mehdi_m
ID: 9691147
Hi.

I have a sample 11KB (source code in delphi7) I wrote for you to use Access database using Ado components, like ADOTable, ADOConnection, DBNavigator.
tell me your E-mail to send it for you.

hope to solve your problem.

mehdi_m.
0
 
LVL 1

Author Comment

by:abunectar
ID: 9692188
hi mehdi
if i use components, the database path will  be static  and after making package and deployment and run in client system how can we specify the path.i think it will show error.how can we over come that error.any solutions.my email-id-abuthahir@neccyber.com
0
 
LVL 2

Accepted Solution

by:
Ray_Adams earned 20 total points
ID: 9692262
why is will be static?
For exmaple i have small application which use ADO and Access database, at design time i use direct path to database, but when i create setup package, i recompile project where i change ConnectionString for ADOConnection to this one.

Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=%s;Mode=Share Deny None;Extended Properties="";Persist Security Info=False;Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False
---
Look at Data Source=%s;
At main form creating procedure i do this.

     ADOConnection1.ConnectionString:=format(ADOConnection1.ConnectionString,[ExtractFilePath(ParamStr(0))+'\myvideo.mdb']);
ADOConnection1.Open;
so you can use any kind of components like ADOQuery for editing you data, why no to try it?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question