Ver Mensaje Individual
  #5 (permalink)  
Antiguo 28/09/2010, 15:26
Avatar de SirDuque
SirDuque
 
Fecha de Ingreso: febrero-2009
Ubicación: Paso del Rey, Buenos Aires, Argentina
Mensajes: 975
Antigüedad: 15 años, 3 meses
Puntos: 89
Respuesta: VS.NET 2008 & MySQL. Crear Login

Código MySQL:
Ver original
  1. Imports MySql
  2. Imports MySql.Data
  3.  
  4. Public Class conexion
  5.  
  6.     Public Shared cn As MySQLConnection
  7.  
  8.     Public Sub AbrirConexion()
  9.         Try
  10.             cn = New MySQLConnection(New MySQLConnectionString("127.0.0.1", "astore", "root", "password", 3306)..AsString)
  11.             cn.Open()
  12.  
  13.             If cn.State = ConnectionState.Open Then
  14.                 MsgBox("conexion exitosa", MsgBoxStyle.MsgBoxRight)
  15.             End If
  16.         Catch ex As MySqlException
  17.             MsgBox("Error: " & ex.Message)
  18.  
  19.         Catch ex As Exception
  20.             MsgBox("Error: " & ex.Message)
  21.         End Try
  22.     End Sub
  23. End Class

me salen dos errores:
MySQLConnection no esta definido
&
MySqlException no esta definido....

Ya tenia instalado los paquetes de MySQL.

___ En referencias agrege:
MySql.Data
MySql.Data.CF
MySql.Data.Entity
MySql.Web