public String ValidateQuery(string name, string password) { string s=""; OleDbConnection con2 = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Amma\Documents\UserData.accdb"); OleDbCommand cmd = new OleDbCommand("SELECT count(*) from login WHERE name='" + name + "' and pwd='" + password + "'", con2); con2.Open(); OleDbDataReader da = cmd.ExecuteReader(); while (da.Read()) { if (da.HasRows == true) { s = "OK"; break; } else { s = "Not Ok"; // I need to pass this variable. break; } }
private void btnLogin_Click(object sender, RoutedEventArgs e) { string uname=textBoxName.Text; string pwd=textBoxPwd.Text; myService.Service1SoapClient client = new Service1SoapClient(); client.ValidateCompleted += new EventHandler<ValidateCompletedEventArgs>(client_ValidateCompleted); client.UpdateQueryAsync(uname, pwd); string result= // here i need get that string here. }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)