Probleme password
jerome2467
Messages postés
10
Statut
Membre
-
francis -
francis -
Bonjour,
sur ma base de donnees j ai une table "connexion"
j ai deux champs dans cette table (usager et password)
par l intermediare de visual studio je cree une application windows form
lorsque les 2 champs rentre dans mes textbox correspondent aux champs de ma table une fenetre s ouvre
mais la elle ne s ouvre pas voici le code
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(@"Data Source=Jerome-123456\sqlexpress;Initial Catalog=test;Integrated Security=True");
con.Open();
SqlDataAdapter thisadpter = new SqlDataAdapter(
"select usager ,password from connexion", con);
DataSet thisdataset = new DataSet();
thisadpter.Fill(thisdataset,"connexion");
foreach (DataRow r in thisdataset.Tables[0].Rows)
{
if (textBox1.Text == (r[0]) && textBox2.Text == (r[1]))
{
MessageBox.Show("yeah!");
}
else
{
MessageBox.Show("NOOOOOOOOO");
}
merci je ne vois pas ou est l erreur
merci d avance
sur ma base de donnees j ai une table "connexion"
j ai deux champs dans cette table (usager et password)
par l intermediare de visual studio je cree une application windows form
lorsque les 2 champs rentre dans mes textbox correspondent aux champs de ma table une fenetre s ouvre
mais la elle ne s ouvre pas voici le code
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(@"Data Source=Jerome-123456\sqlexpress;Initial Catalog=test;Integrated Security=True");
con.Open();
SqlDataAdapter thisadpter = new SqlDataAdapter(
"select usager ,password from connexion", con);
DataSet thisdataset = new DataSet();
thisadpter.Fill(thisdataset,"connexion");
foreach (DataRow r in thisdataset.Tables[0].Rows)
{
if (textBox1.Text == (r[0]) && textBox2.Text == (r[1]))
{
MessageBox.Show("yeah!");
}
else
{
MessageBox.Show("NOOOOOOOOO");
}
merci je ne vois pas ou est l erreur
merci d avance
A voir également:
- Probleme password
- Vu password - Télécharger - Confidentialité
- Proximus public wifi password free - Forum Bbox Bouygues
- Enter current password acer ✓ - Forum Word
- Livebox admin password - Guide
- My canalbox africa login password ✓ - Forum Box et Streaming vidéo