rhysmeister
Programmer
I am using Delphi to access a SQl server DB. Just having a little trouble accessing the results from a SQL statement (which appears to run well). I want to put them onto a label on a form. Here is my code so far...
Code:
Close; // Close any present DB connection
SQL.Clear;
SQL.Add('SELECT * FROM ACI_Errors WHERE ID = (:SelectedParam)');
// Get the index of selected row adding 1
ParamByName('SelectedParam').AsInteger := DBGrid1.SelectedIndex + 1;
ExecSQL; // Execute the SQL