Imports ByteFX.Data.MySqlClient
Imports ICSharpCode.SharpZipLib
Module modBD
Public Const vUSER = "root"
Public Const vPASSWD = "a"
Public Const vDB = "prueba"
Public Const vSERVER = "localhost"
Dim formulario As New frmPrincipal()
Public Sub Conectar()
Dim strCnn As String = "Server=" & vSERVER & ";" & _
"Database=" & vDB & ";" & _
"User ID=" & vUSER & ";" & _
"Password=" & vPASSWD & ";" ' & "Command Logging=false"
Dim _cnn As New MySqlConnection(strCnn)
_cnn.Open()
MsgBox(_cnn.State.String)
_cnn.Close()
_cnn = Nothing
End Sub
Public Sub main()
Conectar()
formulario.ShowDialog()
End Sub
End Module
Un Saludo, gracias
