My goal is to perform a single SQL query (“select xxx from yyyy etc etc”) to a Database over a LAN, using BORLAND C++ 4.5 and managing (runtime) USERNAME and PASSWORD.
I tried 2 methods :
Method N.1) I used “Tquery”, TdataSource and TDBedit components linked togheter and I succeeded but….I need to manage USERNAME and PASSWORD runtime so I’m trying the following method N.2
Method N.2) I’m using TdataBase Component. Although I can Open the DataBase I don’t know how to perform the SQL Query. Do I have to use the Tquery component? In which way? How can I refer the Tquery to the Tdatabase component?
I suppose I have to use the following components :
TDataBase, Tquery, TDataSource and a Data Control such as TDBedit...is it correct?
Can you give me a simple example?