hi guys
i have just started coding the program. I have access document which has 2 table ( duty and
student ) Duty has a password and username for entering the system. There is 2 textbox ,one
for is username and the other for password. The duty must enter his username and password,
if his password and username is correct the second form will open , if they are false there wiil
be a message box to warn the duty.
I have did the connection of database.
Code:
SqlConnection dataConnection = new SqlConnection();
try {
dataConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\\db1.mdb;Persist Security Info=False;";
dataConnection.Open();
SqlCommand dataCommand = new SqlCommand();
dataCommand.Connection = dataConnection;
dataCommand.CommandText ="select d_name and d_pass from duty";
after that how can i control if dname.text is eqaul to d_name and if d_pass.text is equal to d_pass?
i am waiting for your answers..thanks