I'm a Lazarus newbie and database newbie really and I'm trying to run an SQL query on an Oracle database but I can't get the results to display in a DBGrid.
I have the DataSource DataSet as SQLQuery1 and the datasource for the DBGrid as DataSource1. Here is the code to run the query.
procedure Tfrm_imsman_main.btn_searchClick(Sender: TObject);
begin
OpenConnection(nil);
SQLQuery1.Close;
SQLQuery1.SQL.Clear;
SQLQuery1.SQL.Text := 'select * from gve_products';
ShowString(SqlQuery1.SQL.Text);
SQLQuery1.Open;
SQLQuery1.Close;
end;
Thanks for any and all help
Cheers,
B