»Ë»Ñ Æ÷·³
°³¹ßÀÚÆ÷·³ ÀÔ´Ï´Ù.
  • ºÏ¸¶Å© ¾ÆÀÌÄÜ

c#¿¡¼­ ¿À¶óŬ Ä¿³Ø¼ÇÀ» DataTable·Î ÀûÀçÇϴµ¥ ¼º´ÉÀÌ ³Ê¹« ¾È³ª¿À³×¿ä µµ¿ò ºÎŹµå¸³´Ï´Ù.4

  • ÀáÆþ²
  • µî·ÏÀÏ 2016-07-27 16:57
  • Á¶È¸¼ö 1033

ÀÚ¹Ù°³¹ßÀÚÀε¥... ¶á±Ý¾øÀÌ C#À» Á» ½á¾ß ÇÒ ÀÏÀÌ »ý°å½À´Ï´Ù.

¿À¶óŬ¿¡¼­ Äõ¸®¸¦ ³¯·Á¼­ DataTable·Î ³Ö´Âµ¥ ¼º´ÉÀÌ.. -.-;;;

Äõ¸®´Â 149ms¸¸¿¡ µ¹¾Ò´Âµ¥ DataTable·Î ³Ö´Âµ¥ °ÅÀÇ 10ÃÊ°¡ °É¸³´Ï´Ù.

Á¦°¡ ¹º°¡ Àß ¸øÇÏ°í Àִ°Š°°Àºµ¥ ¹ºÁö¸¦ ¸ð¸£°Ú½À´Ï´Ù µµ¿ò ºÎŹµå¸³´Ï´Ù.

 

using (OracleConnection conn = new OracleConnection(_sourceConnString))

{

    conn.Open();

    using (OracleCommand cmd = conn.CreateCommand())

    {                        

        cmd.CommandText = sql;

        using (OracleDataReader dr = cmd.ExecuteReader())//149ms, 32rows

        {

            //XmlDocument doc = DataReadertoDataXML(dr);

            DataTable dt = dataset.Tables.Add("transdata");

            dt.BeginLoadData();

            dt.Load(dr, LoadOption.Upsert);//8,987ms

            dt.EndLoadData();

            _resultGridView.DataSource = dt;

            SetStatus(dt.Rows.Count + "°ÇÀÇ µ¥ÀÌÅÍ°¡ Á¶È¸µÇ¾ú½À´Ï´Ù.");

        }

    }

    conn.Close();

}

 

µ¥ÀÌÅÍ ±¸Á¶´Â

<?xml version="1.0" standalone="yes"?>

<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">

  <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="selectdata" msdata:UseCurrentLocale="true">

    <xs:complexType>

      <xs:choice minOccurs="0" maxOccurs="unbounded">

        <xs:element name="selectdata">

          <xs:complexType>

            <xs:sequence>

              <xs:element name="RECHISTSEQ" type="xs:decimal" minOccurs="0" />

              <xs:element name="RECITEMNO" type="xs:decimal" minOccurs="0" />

              <xs:element name="INSTCD" type="xs:string" minOccurs="0" />

              <xs:element name="FSTLEVLITEMCD" type="xs:string" minOccurs="0" />

              <xs:element name="FORMCD" type="xs:string" minOccurs="0" />

              <xs:element name="FORMDEGNSEQ" type="xs:decimal" minOccurs="0" />

              <xs:element name="DEGNITEMNO" type="xs:decimal" minOccurs="0" />

              <xs:element name="DEGNITEMCD" type="xs:string" minOccurs="0" />

              <xs:element name="DEGNITEMLEVLCD" type="xs:string" minOccurs="0" />

              <xs:element name="RECTERMCD" type="xs:string" minOccurs="0" />

              <xs:element name="RECTERMNM" type="xs:string" minOccurs="0" />

              <xs:element name="RECREFCD" type="xs:string" minOccurs="0" />

              <xs:element name="RECITEMNM" type="xs:string" minOccurs="0" />

              <xs:element name="RECCNTS" type="xs:string" minOccurs="0" />

              <xs:element name="COLNO" type="xs:string" minOccurs="0" />

              <xs:element name="ROWNO" type="xs:string" minOccurs="0" />

              <xs:element name="SUPDEGNITEMNO" type="xs:decimal" minOccurs="0" />

              <xs:element name="DEGNITEMKIND" type="xs:string" minOccurs="0" />

              <xs:element name="DEGNITEMLEVLNO" type="xs:decimal" minOccurs="0" />

              <xs:element name="DEGNITEMNM" type="xs:string" minOccurs="0" />

              <xs:element name="EXTDEGNITEMLEVLCD" type="xs:string" minOccurs="0" />

              <xs:element name="RECTERMFLAG" type="xs:string" minOccurs="0" />

              <xs:element name="DEGNUNITCD" type="xs:string" minOccurs="0" />

              <xs:element name="FSTRGSTRID" type="xs:string" minOccurs="0" />

              <xs:element name="FSTRGSTDT" type="xs:dateTime" minOccurs="0" />

              <xs:element name="LASTUPDTRID" type="xs:string" minOccurs="0" />

              <xs:element name="LASTUPDTDT" type="xs:dateTime" minOccurs="0" />

              <xs:element name="MIG" type="xs:dateTime" minOccurs="0" />

            </xs:sequence>

          </xs:complexType>

        </xs:element>

      </xs:choice>

    </xs:complexType>

  </xs:element>

 

</xs:schema>

ÀÔ´Ï´Ù.

 

ƯÀÌÁ¡À¸·Î´Â CLOBÄ÷³ÀÌ Çϳª ÀÖÁö¸¸ ½ÇÁ¦ µ¥ÀÌÅÍ´Â ±²ÀåÈ÷ ÀÛ½À´Ï´Ù.VARCHAR2(4000)À¸·Î ÃæºÐÈ÷ ó¸®µÉ Á¤µµÀÔ´Ï´Ù.

0
ÃßõÇϱ⠴ٸ¥ÀÇ°ß 0
|
°øÀ¯¹öÆ°

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ÂøÇѾÆÀú¾¾

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ÀáÆþ²

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 escarlet

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 escarlet
  • ¾Ë¸² ¿å¼³, »óó ÁÙ ¼ö ÀÖ´Â ¾ÇÇÃÀº »ï°¡ÁÖ¼¼¿ä.
©¹æ »çÁø  
¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û ¸ñ·Ïº¸±â