Answer the question
In order to leave comments, you need to log in
Which component to use to output delphi database?
Hello. I am writing a program in Delphi, and in it the main function is to display a table with a price list, i.e. product name, price, etc. And now I have a question, what component should be used to display the table? StringGrid or DBGrid (and TTable), it is also planned that by clicking on a line with a product, its price (i.e. the value from line N) is written to some variable. ps The database is a TXT file with a delimiter in the form
ProductName;ProductCategory;ProductPrice
Answer the question
In order to leave comments, you need to log in
If only to display the content, StringGrid is enough. But if you want to edit it - change, add, delete records, then, to put it mildly, the database format is not the most suitable. While nothing is really impossible...
Only DBGrid, StringGrid do not even consider. Take some engine that can represent CSV files as tables, and go ahead. Previously, like BDE was able to do this, but now ADO, if memory serves. There, either something tricky is indicated in the connection string, or an additional file with the names of virtual fields needs to be created. Google it, you'll get it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question