I searched here but did not see an answer .
I am using Delphi2010. I using Devart Mydac to connect to mySql data base . When i set the Server, Database, Name , Pass in the component it connects no problem.
BUt when I try to connect just with code it give an error.
begin
MyConnection1.Server:='MyServer';
MyConnection1.Database:='MyDatabase';
MyConnection1.Username:='MyUserName';
MyConnection1.Password:='MyPassword';
MyConnection1.Connected:= True;
MyQuery1.Active:= True;
end;
exception class EMySalExcption with message"#28000 Access denied for user'username@00.00.00.00'(useing passworkd: YES)'.
Why will the code method cause an error ?
Thanks for your help and patience.