Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is my code in the login click button as Sir suggested:

private void btnLogin_Click(object sender, EventArgs e)
{
AppDatabase1DataSet ds = new AppDatabase1DataSet ();
AppDatabase1DataSet .LoginDataTable dt = new AppDatabase1DataSet.LoginDataTable ();
AppDatabase1DataSet.LoginDataTable();
this.loginTableAdapter1 .Fill (dt) ;
foreach (DataRow dr in dt .Rows )
    {
      if(dr[0].ToString()==txtuname .Text && dr[1].ToString()== txtpassword.Text )
    {
      txtpassword.Text = "";
      txtpassword.Text = dr[0].ToString();
      MessageBox.Show("Login Succeeded");
    }


I've defined everythings accordingly but this error pops up on the LoginDataTable() line:

Error 1 'csharp_phonebk.AppDatabase1DataSet.LoginDataTable' is a 'type', which is not valid in the given context

I don't know why...Please answer me asap.
Posted
Updated 16-Jan-10 22:03pm
v2

1 solution

wrote:
AppDatabase1DataSet.LoginDataTable();


Here you are using LoginDataTable as a method. But since it is a class, you are getting the error.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900