TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
msizi dlamini
NA
3
1.1k
Exception
Feb 26 2015 9:02 AM
Good Day
May anyone assist me, i am still a junior is applications development and i am developing an application. have reached my login button to send me to another form. please assist me any body my code below, when i run it it throws this exception
An unhandled exception of type 'System.NotImplementedException' occurred in Balanced ScoreCard.exe
Additional information: The method or operation is not implemented.
try
{
if (!(usertxt.Text == string.Empty))
{
if (!(userpa.Text == string.Empty))
{
String str = "server=MSIZI-PC03;database=windowapp;UID=sa;password=123";
String query = "select * from data where username = '" + usertxt.Text + "'and password = '" + this.userpa.Text + "'";
SqlConnection con = new SqlConnection(str);
SqlCommand cmd = new SqlCommand(query, con);
SqlDataReader dbr;
con.Open();
dbr = cmd.ExecuteReader();
int count = 0;
while (dbr.Read())
{
count = count + 1;
}
if (count == 1)
{
MessageBox.Show("username and password is correct");
}
else if (count > 1)
{
MessageBox.Show("Duplicate username and password", "Login Form");
}
else
{
MessageBox.Show(" username and password incorrect", "Login Form");
}
}
else
{
MessageBox.Show(" password empty", "Login Form");
}
}
else
{
MessageBox.Show(" username empty", "Login Form");
}
// con.Close();
}
catch (Exception)
{
FrmMain.show();
}
Reply
Answers (
2
)
How memory is allocated in .Net application
How do I edit a project template used in Visual Studio?