SELECT *
FROM Candidate
WHERE Candidate.Username = CurrentUser
CurrentUser is a global variable (string) which gets the username from the login. When I try to use the SQLQuery with a TDBGrid I get the error, Parameter CurrentUser has no default value.
unit UntVar;
interface
Var Currentuser:String;
implementation
end.
Code for the Global variable.
CurrentUser := EdtUser.Text; Code for when currentuser gains a value.
CurrentUserand trying to give it to the query.