Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Com o componente MySQL56Connection e SQLQuery nativos do Lazarus
- uses
- mysql56conn, SQLDB;
- Conexao := TMySQL56Connection.Create(nil);
- Transaction := TSQLTransaction.Create(nil);
- Query: TSQLQuery.Create(nil);
- with Conexao do
- begin
- UserName := 'usuario';
- Password := 'senha';
- DatabaseName := 'nome_banco';
- HostName := 'ip_ou_site';
- Port := 3306;
- Transaction := Transaction;
- end;
- Query.DataBase := Conexao;
- //Confirmar Transação
- Transaction.Commit;
- //Cancelar transação
- Transaction.Rollback;
- //Fechar a conexao ao termino
- Conexao.Close(True);
- //Dll
- libmysql.dll
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement