30 minuti per la query?
non conosco il tuo setup ... ma forse per sapere se un server e' su o meno potresti fare in modo diverso .... magari in loco (ovvero sulla macchina che gestisce il database).
Se invece ti serve un controllo sul client, penso che esista il parametro .timeout nella connessione
Dim Comando As String = "select * from canzoni"
Dim $Con As New Connection
Dim Risultato As Result
$Con.close() ' Close the connection
$Con.Type = "MySQL" ' Type of connection
$Con.Host = TextBox_IP.Text ' Name of the server
$Con.Login = TextBox_DBuser.Text ' User's name for the connection
$Con.Port = TextBox_Port.Text ' Port to use in the connection, usually 3306
$Con.Name = TextBox_DBname.Text ' Name of the database we want to use
$Con.Password = TextBox_DBpass.Text ' User's password
$con.Timeout = 2 'in secon