hi! can anybody please help me. Given the code below how can i check if it does returns anything.
Thanks advance!!!Code:string SqlConnStr = Properties.Settings.Default.MyConnString; sqlConn = new SqlConnection(SqlConnStr); sqlConn.Open(); qryStr = "Select username from users where username = '" + txtNewUsername.Text.ToUpper() + "'"; SqlCommand sqlCmd = new SqlCommand(qryStr, sqlConn); object result = sqlCmd.ExecuteScalar();




Reply With Quote