: : : : i have a homework...my homework is to read file text, compare with the database and show it up. The problem is that i must show it in form with RGB color...the point is if the value in text file is 1 then i must compare with my database,check if that value in database and then i must show it in form is red color.if the value in text file is 2 then i must show in form green,3 is blue, 4 is white.Help me...
: : : :
: : : Use a case statement to set the color. Then show the value.
: : :
: : but how to connect to the database?i can show my file text into memo but i can't compare it to the database because i dont know the code
: :
: That greatly depends on the database. If it is an SQL database, you'll need some SQL statement like this to get the value from the database:
:
: 'SELECT * FROM table WHERE value = "'+TextValue+'"';
:
: If it is an non-SQL database you need to either iterate through the record using a while-do loop or use the database search algorithms.
: If the database is a flat list of objects it might also support a search algorithm or you'll have to again write an iteration routine.
: As you can see, without knowing what kind of database it is, it is very difficult to give an answer.
:
i use delphi database (paradox 7)...i'm very-very new in delphi programming...i never use delphi before...it's my first time i am using delphi...would you help me to understand delphi step by step?
Help me to make connection with my database...