|
| Total Answers and Comments: 3 |
Last Update: November 10, 2006 Asked by: K.Gajalakshmi |
|
| | |
|
No best answer available. Please pick the good answer available or submit your answer. | |
October 05, 2006 08:16:24 | #1 |
| Chakravarthi |
|
|
RE: private void Button1_Click(object sender, System.E...
| May be your no intializing the adapter class object . check once again the declaration & intiatlization block ad = new OledbAdapter ad.connection=con |  | | Is this answer useful? Yes | No | | |
|
| |
|
November 05, 2006 23:46:34 | #2 |
| Guru |
|
|
RE: private void Button1_Click(object sender, System.E...
| try { OledbConnection con=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:signin.mdb;Persist Security Info=False"); string s; s="select * from login where username='" + TextBox1.Text + "'and password='" + TextBox2.Text + "'"; OledbDataaAdapter ad=new OledbDataAdaptead(); ad.SelectCommand.CommandText=s; DataSet ds=new DataSet(); ad.Fill(ds); if(ds.Tables[0].Rows.Count>0) { Label3.Text ="valid user"; } else Label3.Text="Invalid user"; } catch(Exception ex) { Response.Write(ex.Message()); } |  | | Is this answer useful? Yes | No | | |
|
| |
Go To Top
|