Can not connect to mysql [solved]
Posted: 28.01.2010, 21:43
hi all, iam new bie to use zeos and i have probelm when i am try to connect mysql. my error message database connection component is not assigned. i use delphi 7 and mysql server 5.0.16-nt.
and this my code :
and this my code :
Code: Select all
var
Db:TZConnection;
query:TZQuery;
begin
Db:=TZConnection.Create(nil);
Db.Protocol:='mysql';
Db.HostName:='localhost';
Db.Database:='bali';
Db.User:='root';
Db.Password:='';
query:=TZQuery.Create(nil);
query.SQL.Clear;
query.SQL.Add('SELECT * from inbox limit 0,10');
query.Open;
query.Last;
writeln(query.FieldByName('Text').AsString);
query.Close;
Db.Free;
end;