Handling database

This is my first project in Delphi and I badly need some help. Can somebody help me with my data entry, editing and processing of data? Thanks.
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.

Mohammed NasmanSoftware DeveloperCommented:
  Here are some steps to make a simple database program

1. drop Table components on the form, and set the Database property to: DBDemos, and the TableName property to: Customer, then set the Active Property to: True.

2. Double Click on the Table component that on the form, u will see new window, right click on it, and choose add all fields.

3. Select all the fields, and draw them on the form, you will see the controls on the form connected to ur table, and Datasource Component.

4. From the Datacontrol Tab, drop DBNavigator on the form, and set it's DataSource Property to Datasource1

5. Run your project, you have now simple database application, and you can add, edit and delete records to the table using the DBNavigator

Best regards
Mohammed Nasman
sharolAuthor Commented:
im using apollo as my database tool. can you help me with this? I would like to make use of buttons to handle the database so that it would be user friendly.would you like to take a look t my form?
Mohammed NasmanSoftware DeveloperCommented:

  here's the code for add, save and delete

procedure TForm1.btnAddClick(Sender: TObject);

procedure TForm1.btnSaveClick(Sender: TObject);

procedure TForm1.btnDeleteClick(Sender: TObject);
  if MessageDlg('Do you want to Delete this record',mtError,[mbYes,mbNo],0) = mrYes then
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Mohammed NasmanSoftware DeveloperCommented:
if you wish also to move between records using code, look at

sharolAuthor Commented:
I am handling the database with a datasource. How do I delete records with that component? Can you provide me the code for the delete button with a messagebox so that there will be a verification before a record is deleted. I tried the code you provided but it won't work. Maybe I lack something.
And also, can you help me with my date field. I am using a dbedit for the date entry but I always get an error message that the date entered is not a valid date though for me it is. There must be something I need to declare or configure. Thanks again.
He's provided what you ask for already.  What didn't work?

What is the ShortDateFormat for your system?  That is really a seperate question.
sharolAuthor Commented:
okay, disregard the date question.

about the delete, its not working. what i am doing is i display the records in a dbgrid. qnd when the user clicks a record and then click the delte button, that record should be deleted. how do i do this? hope you could help me, please. thanks a lot.
Mohammed NasmanSoftware DeveloperCommented:
Hello sharol

  the code i gave to you working fine with delete

however, when you have table that has a details, you can't delete a record from the master table and there are existing records to it in the detail table

give me ur email
and i will send you a sample application for the database, that contain most of the functions

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
sharolAuthor Commented:
it a_lynpm@yahoo.com. thanks a lot.

hope you could provide me with one that deals with an apollo table,datasource and a dbgrid whrein the records are displayed. thanks again. il wait for your e-mail.
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
Mohammed NasmanSoftware DeveloperCommented:
points to me
Lukasz LachCommented:
No comment has been added lately (12 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to mnasman http:#7145331

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --


EE Cleanup Volunteer
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

From novice to tech pro — start learning today.