0

I want to create an application for my friends ,Its like a slam book

I want like this

  1. in nameditbox when i entered name it has to fetch data from database and have to display in respected fields

example : nick name editboz :nick number:1111

2.moreover i want to add to database new entry from my application by clicking add button

  1. is it possible to edit already existed friends name details ?

I never worked with mysql (even i dont know much ), and i never worked in delphi in accordance with mysql ,not normal dlephi though .

is there any already done project ?if yes please link me i want to learn hope some one can help me in this thanks in advance

3
  • You really need to ask smaller questions. Try to code it and when you have issues/problems, than ask specific questions, and try to provide the code you are having an issue with. Commented Dec 20, 2009 at 18:21
  • First try to create the slam book using Delphi and a desktop db. Once you get that working, read up about connecting to a mysql db. Commented Dec 20, 2009 at 22:08
  • Try following a tutorial on database programming in Delphi. Google "delphi database beginner tutorial". First hit must be "A Beginner's Guide to Delphi Database Programming" on about.com, by Zarko Gajic. Try it. Commented Dec 21, 2009 at 14:59

1 Answer 1

2

I have to say I haven't tried this with MySQL, however hope this helps.

For part 1 of your question:

I suggest the easiest way is to use the free MySQL ODBC driver from http://dev.mysql.com/downloads/connector/odbc/5.1.html

Delphi supports connecting using ODBC (Open Database Connectivity). Essentially, Delphi doesn't know about any of the particular features of the MySQL database, but knows about a smaller set of features common across the majority databases.

If you can get this ODBC driver to connect to MySQL, then you will be able to look at all of the good examples on the Internet and in the supplied Delphi help files showing you how to:

  • Create an ODBC data source in Windows ODBC Manager.
  • Open a TDatabase connection to the MySQL ODBC data source
  • Connect a TTable to a TDatabase
  • Connect a TDataSource to a TTable
  • Connect a TDBEdit to a TDataSource

You will need to learn yourself how to connect these to a particular table in your MySQL database.

Connecting these components together like this should give you a working example for what you are trying.

You should find lots of good tutorials showing you how to connect to an ODBC database on the Internet.

For part 2 of your question:

Once you have done part 1, reaching part 2 is a small step from there.

  • Connect a TDBNavigator to the TDataSource.

This will enable you to navigate the table of data and will enable an add/edit/delete feature for the table allowing a new row, deletion of a row and editing of a row.

Best of luck with this.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.