xarsoft
Messages postés21Date d'inscriptionmardi 8 avril 2008StatutMembreDernière intervention 2 février 2009
-
7 janv. 2009 à 15:27
PCPT
Messages postés13272Date d'inscriptionlundi 13 décembre 2004StatutMembreDernière intervention 3 février 2018
-
7 janv. 2009 à 15:40
bonjour, voila j'ai télécharger la source http://www.vbfrance.com/code.aspx?ID=47860 et j'aimerai que le fichier de la base de donnée soit sur mon site (exemple: http://www.xarsoft.fr.nf) ou qu'il se connecte a ma base mysql avec la table TOTO par exemple mais je ne sait pas comment faire voici le code:
Private Sub BConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BConnect.Click, MyBase.Click
If connecte = False Then
Dim queryString As String = "SELECT type FROM `USER` WHERE login='" & _
TxtLogin.Text & "' and password='" & TxtPassword.Text & "'"
Dim connectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data source=utilisateur.accdb"
Using connection As New OleDbConnection(connectionString)
Dim command As New OleDbCommand(queryString, connection)
connection.Open()
Dim myReader As OleDbDataReader = command.ExecuteReader(CommandBehavior.CloseConnection)
While myReader.Read()
If myReader.GetString(0) IsNot Nothing Then
MsgBox("Vous êtes connéctés!", , "Connexion établie")
connecte = True
user = TxtLogin.Text
typeUser = myReader.GetString(0)
Else
MsgBox("login ou mot de passe erronés!", MsgBoxStyle.Critical, "Connexion échoué")
End If
End While
myReader.Close()