string strSQL = "SELECT USERID FROM TBUSERS WHERE USERNAME='" + username + "'";
string strDSN = "server=POS;uid=system;pwd=system;database=POS";
OdbcDataAdapter dataAdapter = new OdbcDataAdapter(strSQL, strDSN);
DataSet ds = new DataSet();
dataAdapter.Fill (ds);
DataTable table = ds.Tables[0];
foreach (DataRow row in table.Rows)
{
string pw = row[0].ToString ().TrimEnd (new char[] { ' ' });
if (String.Compare (password, pw, false) == 0)
return true;
}
return false;