Author: Senn Marco How to connect to a mySQL database Answer: Perhaps you have already seen the uses clause. You may download mySQL.pas from www.fichtner.net/delphiwww.fichtner.net/delphi 1 uses mySQL; 2 3 procedure Connect; 4 var 5 myServer: PMysql; 6 Tables: PMYSQL_RES; 7 TableRows: my_ulonglong; 8 Table: PMYSQL_ROW; 9 begin 10 myServer := mysql_init(nil); 11 if myServer <> nil then 12 begin 13 if mysql_options(myServer, MYSQL_OPT_CONNECT_TIMEOUT, '30') = 0 then 14 begin 15 if mysql_real_connect(myServer, 'host', 'user', 'password', 'database', 3306, 16 nil, CLIENT_COMPRESS) <> nil then 17 begin 18 Tables := mysql_list_tables(myServer, nil); 19 if Tables <> nil then 20 begin 21 TableRows := mysql_num_rows(Tables); 22 while TableRows > 0 do 23 begin 24 Table := mysql_fetch_row(Tables); 25 Tabelle := Table[0]; 26 Dec(TableRows); 27 end; 28 end; 29 end; 30 end; 31 end; 32 end;