Hi i'm wondering 2 things
[1]
can one loop thru a public string array (aller)
if (aller[0].ToString() != Request.Form["aller0"].ToString()) { cmd.Parameters.Add("@aller0", SqlDbType.NVarChar).Value = Request.Form["aller0"].ToString(); }
if (aller[1].ToString() != Request.Form["aller1"].ToString()) { cmd.Parameters.Add("@aller1", SqlDbType.NVarChar).Value = Request.Form["aller1"].ToString(); }
if (aller[2].ToString() != Request.Form["aller2"].ToString()) {
....
something like ?:
for (int i = 0; i <= 26; i++)
{
if (aller.ToString() != Request.Form["aller"].ToString()) { cmd.Parameters.Add("@aller", SqlDbType.NVarChar).Value = Request.Form["aller"].ToString()); }
}
[2]
ALSO can using the SqlDataReader rdr be used with the public array something like,
aller = (string)rdr1["aller"];
Thanks again
[1]
can one loop thru a public string array (aller)
if (aller[0].ToString() != Request.Form["aller0"].ToString()) { cmd.Parameters.Add("@aller0", SqlDbType.NVarChar).Value = Request.Form["aller0"].ToString(); }
if (aller[1].ToString() != Request.Form["aller1"].ToString()) { cmd.Parameters.Add("@aller1", SqlDbType.NVarChar).Value = Request.Form["aller1"].ToString(); }
if (aller[2].ToString() != Request.Form["aller2"].ToString()) {
....
something like ?:
for (int i = 0; i <= 26; i++)
{
if (aller.ToString() != Request.Form["aller"].ToString()) { cmd.Parameters.Add("@aller", SqlDbType.NVarChar).Value = Request.Form["aller"].ToString()); }
}
[2]
ALSO can using the SqlDataReader rdr be used with the public array something like,
aller = (string)rdr1["aller"];
Thanks again