久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='Mb4UR'></tfoot>

    <small id='Mb4UR'></small><noframes id='Mb4UR'>

        <bdo id='Mb4UR'></bdo><ul id='Mb4UR'></ul>
    1. <legend id='Mb4UR'><style id='Mb4UR'><dir id='Mb4UR'><q id='Mb4UR'></q></dir></style></legend>
    2. <i id='Mb4UR'><tr id='Mb4UR'><dt id='Mb4UR'><q id='Mb4UR'><span id='Mb4UR'><b id='Mb4UR'><form id='Mb4UR'><ins id='Mb4UR'></ins><ul id='Mb4UR'></ul><sub id='Mb4UR'></sub></form><legend id='Mb4UR'></legend><bdo id='Mb4UR'><pre id='Mb4UR'><center id='Mb4UR'></center></pre></bdo></b><th id='Mb4UR'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Mb4UR'><tfoot id='Mb4UR'></tfoot><dl id='Mb4UR'><fieldset id='Mb4UR'></fieldset></dl></div>

      1. 如何將一列插入到兩個現(xiàn)有列之間的數(shù)據(jù)集中?

        How does one insert a column into a dataset between two existing columns?(如何將一列插入到兩個現(xiàn)有列之間的數(shù)據(jù)集中?)

          <i id='j8vD7'><tr id='j8vD7'><dt id='j8vD7'><q id='j8vD7'><span id='j8vD7'><b id='j8vD7'><form id='j8vD7'><ins id='j8vD7'></ins><ul id='j8vD7'></ul><sub id='j8vD7'></sub></form><legend id='j8vD7'></legend><bdo id='j8vD7'><pre id='j8vD7'><center id='j8vD7'></center></pre></bdo></b><th id='j8vD7'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='j8vD7'><tfoot id='j8vD7'></tfoot><dl id='j8vD7'><fieldset id='j8vD7'></fieldset></dl></div>
            <tbody id='j8vD7'></tbody>

          <small id='j8vD7'></small><noframes id='j8vD7'>

                • <bdo id='j8vD7'></bdo><ul id='j8vD7'></ul>
                • <tfoot id='j8vD7'></tfoot>
                  <legend id='j8vD7'><style id='j8vD7'><dir id='j8vD7'><q id='j8vD7'></q></dir></style></legend>
                • 本文介紹了如何將一列插入到兩個現(xiàn)有列之間的數(shù)據(jù)集中?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我正在嘗試使用 C# 在現(xiàn)有數(shù)據(jù)集中插入一列.

                  I'm trying to insert a column into an existing DataSet using C#.

                  作為一個例子,我有一個如下定義的數(shù)據(jù)集:

                  As an example I have a DataSet defined as follows:

                  DataSet ds = new DataSet();
                  ds.Tables.Add(new DataTable());
                  ds.Tables[0].Columns.Add("column_1", typeof(string));
                  ds.Tables[0].Columns.Add("column_2", typeof(int));
                  ds.Tables[0].Columns.Add("column_4", typeof(string));
                  

                  稍后在我的代碼中,我想在第 2 列和第 4 列之間插入一列.

                  later on in my code I am wanting to insert a column between column 2 and column 4.

                  DataSet 有添加列的方法,但我似乎找不到插入列的最佳方法.

                  DataSets have methods for adding a column but I can't seem to find the best way in insert one.

                  我想寫一些類似下面的東西......

                  I'd like to write something like the following...

                  ...Columns.InsertAfter("column_2", "column_3", typeof(string))
                  

                  最終結(jié)果應該是一個包含以下列的表的數(shù)據(jù)集:column_1 column_2 column_3 column_4

                  The end result should be a data set that has a table with the following columns: column_1 column_2 column_3 column_4

                  而不是:column_1 column_2 column_4 column_3 這是 add 方法給我的

                  rather than: column_1 column_2 column_4 column_3 which is what the add method gives me

                  肯定有辦法做這樣的事情.

                  surely there must be a way of doing something like this.

                  編輯...只是想根據(jù)下面的一些評論澄清我對 DataSet 所做的事情:

                  Edit...Just wanting to clarify what I'm doing with the DataSet based on some of the comments below:

                  我正在從存儲的程序.然后我必須添加數(shù)據(jù)集的附加列然后將其轉(zhuǎn)換為 Excel文檔.我無法控制存儲過程返回的數(shù)據(jù)所以我必須在之后添加列事實.

                  I am getting a data set from a stored procedure. I am then having to add additional columns to the data set which is then converted into an Excel document. I do not have control over the data returned by the stored proc so I have to add columns after the fact.

                  推薦答案

                  您可以使用 DataColumn.SetOrdinal() 用于此目的的方法.

                  You can use the DataColumn.SetOrdinal() method for this purpose.

                  DataSet ds = new DataSet();
                  ds.Tables.Add(new DataTable());
                  ds.Tables[0].Columns.Add("column_1", typeof(string));
                  ds.Tables[0].Columns.Add("column_2", typeof(int));
                  ds.Tables[0].Columns.Add("column_4", typeof(string));
                  ds.Tables[0].Columns.Add("column_3", typeof(string));
                  //set column 3 to be before column 4
                  ds.Tables[0].Columns[3].SetOrdinal(2);
                  

                  這篇關于如何將一列插入到兩個現(xiàn)有列之間的數(shù)據(jù)集中?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                  Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 OnClick)

                  <small id='kY96x'></small><noframes id='kY96x'>

                  <legend id='kY96x'><style id='kY96x'><dir id='kY96x'><q id='kY96x'></q></dir></style></legend>
                    <tbody id='kY96x'></tbody>
                • <tfoot id='kY96x'></tfoot>
                  • <bdo id='kY96x'></bdo><ul id='kY96x'></ul>

                      <i id='kY96x'><tr id='kY96x'><dt id='kY96x'><q id='kY96x'><span id='kY96x'><b id='kY96x'><form id='kY96x'><ins id='kY96x'></ins><ul id='kY96x'></ul><sub id='kY96x'></sub></form><legend id='kY96x'></legend><bdo id='kY96x'><pre id='kY96x'><center id='kY96x'></center></pre></bdo></b><th id='kY96x'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='kY96x'><tfoot id='kY96x'></tfoot><dl id='kY96x'><fieldset id='kY96x'></fieldset></dl></div>

                          1. 主站蜘蛛池模板: 中文字幕一区在线观看视频 | 免费视频久久久久 | 国产在线中文 | 日本在线播放一区二区 | 成人免费观看男女羞羞视频 | 成人午夜 | 成人一区二区三区 | 日韩一级免费电影 | 麻豆成人在线视频 | 97精品国产97久久久久久免费 | 欧美一级精品片在线看 | 久久久久久国产精品久久 | 91精品国产一区二区三区动漫 | 91大神在线看 | 成人影院一区二区三区 | 97伦理影院 | 国内精品久久久久久影视8 最新黄色在线观看 | 久久国产精品72免费观看 | 成人免费观看视频 | 午夜视频免费在线观看 | 欧美日韩毛片 | 日本a视频 | 精品久久久久久久人人人人传媒 | 欧美性成人 | 精精国产xxxx视频在线野外 | 国产精品一区二区三区四区 | av黄色片| 九一在线 | 国产亚洲一区二区精品 | 天天影视色综合 | 你懂的国产 | 欧美一区二区三区在线观看 | 91免费视频观看 | 成人在线播放网站 | 日韩视频一区二区三区 | 亚洲视频中文字幕 | 欧美日韩在线精品 | 日韩欧美国产一区二区三区 | 综合国产| 国产韩国精品一区二区三区 | 国产一级片在线观看视频 |