| |

VerySource

 Forgot password?
 Register
Search
View: 658|Reply: 3

How to send the client's xml and schema submission to the server and save the dataset to the database?

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-2-21 21:30:01
| Show all posts |Read mode
Can the schema be saved on the client? (Similar to xml data island)
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-5-4 17:15:01
| Show all posts
Can it only be opened as a file?
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-5-7 14:45:02
| Show all posts
What does schema mean?
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-5-7 16:30:01
| Show all posts
string OrderNumERP = null;
        DB d = new DB ();
        XmlDocument xd = new XmlDocument ();
        xd.Load (File1.Value);
        XmlNodeList xnl = xd.GetElementsByTagName ("SCSSalesOrderHeader");
        for (int i = 0; i <xnl.Count; i ++)
        {
            sql = "insert into Header values ​​(";
            foreach (XmlNode xn in xnl [i] .ChildNodes)
            {

                sql = sql + "'" + xn.InnerText + "',";
            }
            OrderNumERP = xnl [i] .ChildNodes [3] .InnerText;
            sql = sql.Substring (0, sql.Length-1);
            sql = sql + ")";
            d.gengxin (sql);
        }


public void gengxin (string sql)
    {

        string name = ConfigurationManager.AppSettings ["name"];
        SqlConnection scon = new SqlConnection (con);
        scon.Open ();
        SqlCommand scom = new SqlCommand (sql, scon);
        scom.ExecuteNonQuery ();
        scon.Close ();
    }
Written messy
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list