i am currently trying to design a login page... but looks like i have a problem... i would appreciate if mistakes are pointed out... my codes are as follows private void button1_Click(object sender, EventArgs e) { try { DataSet1 dat = new DataSet1(); DataSet1TableAdapters.usersTableAdapter usr2 = new DataSet1TableAdapters.usersTableAdapter(); usr2.FillBy(dat.users, textBox1.Text, textBox3.Text); string usrnm = dat.users.Rows[0][0].ToString(); string mode = dat.users.Rows[0][1].ToString(); string passwrd = dat.users.Rows[0][2].ToString(); if (usrnm == textBox1.Text && passwrd == textBox3.Text) { if (mode == "IndustryMode") { IndustryModePage ind = new IndustryModePage(); ind.MdiParent = this; ind.Show(); } else if (mode == "HomeMode") { HomeModePage hom = new HomeModePage(); hom.MdiParent = this; hom.Show(); } } else { MessageBox.Show("wrong user/password combination"); } } catch { MessageBox.Show("non existing user"); } } } its giving me an error that even my existing users are non existing.
dat.users
dat
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)