Hello, I am trying to run SQL queries using a button click in Delphi, the database is successfully connected everything compiles fine when i enter the query i.e. "Select * from StaffDetails" and then click on run expecting it to show me the results in the DBGrid nothing happens at all the code for the button is as follows
procedure TForm1.Button1Click(Sender: TObject);
begin
ADOQuery1.Close;
ADOQuery1.SQL.Text := Memo1.Text;
ADOQuery1.Open;
end;
I was thinking there would need to be some more in there, but watched several videos and this is all they seemed to have in there, so i am stumped for ideas. Everything else seems to be connected okay.
Any help is greatly appreciated.
Thanks Guys cant believe it was so simple have been sitting here since 9.30am and its now 14.37 lol must have fried my brain sitting here lol Thanks for your help guys much appreciated :)
Thanks in Advance Andy