Hi, can anyone tell me how one present query resutls (from TOraQuery) in a TDBGrid control? Is is possible?
It would be great if you could write a small loop as an example (in C++ or Delphi).
thanks from the bottom from my heart for any help
Using TOraQuery with TDBGrid
Re: Using TOraQuery with TDBGrid
Normally you don't need any kind of loop at all:
0. Place TOraSession (OraSession1) on the form.
1. Place TOraQuery (OraQuery1) on the form. Property Session is automatically set to OraSession1.
2. Place TOraDataSource(OraDataSource1) on the form, and set DataSet property to OraQuery1.
3. Place TDBGrid (or TCRDBGrid) on the form, and set the DataSource property to OraDataSource1.
4. Double click on OraQuery1 and fill in the SQL to select the data from the database.
5. Set the Active property of OraQuery1 to true. After DB login you can see your data in the grid, even at design time.
If you want to manipulate the data in the grid (insert, update, delete), you have to add the corresponding sql in OraQuery1. The built in SQL Generator is a big help for that.
Thomas
0. Place TOraSession (OraSession1) on the form.
1. Place TOraQuery (OraQuery1) on the form. Property Session is automatically set to OraSession1.
2. Place TOraDataSource(OraDataSource1) on the form, and set DataSet property to OraQuery1.
3. Place TDBGrid (or TCRDBGrid) on the form, and set the DataSource property to OraDataSource1.
4. Double click on OraQuery1 and fill in the SQL to select the data from the database.
5. Set the Active property of OraQuery1 to true. After DB login you can see your data in the grid, even at design time.
If you want to manipulate the data in the grid (insert, update, delete), you have to add the corresponding sql in OraQuery1. The built in SQL Generator is a big help for that.
Thomas