There isn’t a wright answer possible, I think. Is this an Question about programming in Borland C++ or Borland C++Builder? I can not remember me that Borland C++ has an DB Navigator. Thus I suppose that this concern an question for C++Builder.
A wright answer also depends on which database you are using. ADO? ODBC? MySql? Acces? Interbase? BDE?
You have to follow those steps:
1. Place an DataBase component on your Form (not always nessecary) and fill in the DataBaseName property.
2. Place an DataSource component on your Form and fill the properties in so the DataSource is connected to the DataBase component
(The principles are; for each DataSet you need an DataSource. All component concern one DataSet for instance a DBNavigator or DBGrid that should navigate, view, etc the data of an DataSet, such as for example, a Table or an Querry, can be referred by setting their property DataSource to the corresponding DataSource component.)
For an Query:
Place an QueryDatSet on your form such as TQuery and a DBNavigator. Because you will probable wish to see your data you will need to place an component as DBGrid or DBEdit on your form too.
Set the property DataSource of all those component to the corresponding DataSource component. In this case there is only one DataSource component possible, but still you need to fill it in and fill in their DataField property.
Fill in the SQL properties of the Query component.
Set all the properties of all the component wich have the property ‘active’ to true.
Now you should see the result of the query in design time....
Lot of lot of work are needed to have a good working executable that will managed your SQL. They wrote many books about this matter.
Pleace, read those books and don’t ask on this forum to write one for you. ), or write the code step by step for you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.