日期:2014-05-18 浏览次数:20728 次
foreach (XmlNode xn2 in xn1) { StringBuilder strSql = new StringBuilder(); StringBuilder strSql1 = new StringBuilder(); StringBuilder strSql2 = new StringBuilder(); if (xn2.Name == "A") { // TPID = xn2.InnerText; strSql1.Append("TPID,"); strSql2.Append("" + xn2.InnerText + ","); } if (xn2.Name == "B") { strSql1.Append("ZFID,"); strSql2.Append("" + xn2.InnerText + ","); // ZFID = xn2.InnerText; } if (xn2.Name == "SLTID") { string SLTID = xn2.InnerText; } if (xn2.Name == "C") strSql.Append("insert into AA("); strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1)); strSql.Append(")"); strSql.Append(" values ("); strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1)); strSql.Append(")"); int rows = DbHelperSQL.ExecUpdateOracle(strSql.ToString(), conn); }