public string UpdateUserID(string updateID) { UpdatedBy = System.Web.HttpContext.Current.Request.LogonUserIdentity.Name.Substring(12); string sql = "select Update_UserID from Cwipuser.CWIP_Variances "; SqlCommand cmd = new SqlCommand(sql, MyCon); MyCon.Open(); SqlDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { if (!rdr.IsDBNull(1)) { updateID = rdr.GetString(1); } updateID = UpdatedBy; } MyCon.Close(); return updateID; }
while (rdr.Read()) { if (!rdr.IsDBNull(0)) { updateID = rdr.GetString(0); } updateID = UpdatedBy; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)