Sub BotonConectar_Click
Dim Valido As Boolean=True, t As String
CantidadBases=0
ProgressDialogShow("Connecting")
Try
If txtServidor.Text.Trim.Length=0 Then
Valido=False
Msgbox ("Server Info Required","Missing Info")
txtServidor.RequestFocus
End If
If txtPort.Text.Trim.Length=0 Then
Valido=False
Msgbox ("Port Info Required","Missing Info")
txtPort.RequestFocus
End If
If txtUser.Text.Trim.Length=0 Then
Valido=False
Msgbox("User Info Required","Missing Info")
txtUser.RequestFocus
End If
If txtPassword.Text.Trim.Length=0 Then
Valido=False
Msgbox("Password Info Required","Missing Info")
txtPassword.RequestFocus
End If
If Valido=True Then
MySQL.MySQL_Server=txtServidor.Text.Trim
MySQL.MySQL_Port=txtPort.Text.Trim
MySQL.MySQL_User=txtUser.Text.Trim
MySQL.MySQL_Password=txtPassword.Text.Trim
MySQL.ListadeBases.Initialize
CallSub(MySQL,"ConectaSchema")
t="SELECT DISTINCT(TABLE_SCHEMA) AS BASE, Count(DISTINCT(TABLE_SCHEMA)) as Registros FROM TABLES WHERE TABLE_SCHEMA<>'information_schema'"
CallSub2(MySQL,"LeoMySQLSchema",CreateMap("TextoSQL":t,"Activity":"Main","Modulo":"Schema_LeoTablas"))
End If
Catch
Msgbox(LastException.Message,"Error")
Log(LastException)
End Try
End Sub