<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: SACommand &amp; SQL load table in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/sacommand-sql-load-table/qaa-p/13841642#M4872485</link>
    <description>&lt;P&gt;funny in 11.0.1 it is not said to be non implemented.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jun 2011 07:03:04 GMT</pubDate>
    <dc:creator>MCMartin</dc:creator>
    <dc:date>2011-06-07T07:03:04Z</dc:date>
    <item>
      <title>SACommand &amp; SQL load table</title>
      <link>https://community.sap.com/t5/technology-q-a/sacommand-sql-load-table/qaq-p/13841640</link>
      <description>&lt;P&gt;I have an .NET 3.5 Application and I use SACommand with an SQL "load table" statement to load data from a asciifile to a table of an SQl Anywhere 12 database. If I have only a few datasets it run's perfect but if I have some more (&amp;lt; 10.000) datasets I got a timeout. &lt;/P&gt;
&lt;P&gt;code example:&lt;/P&gt;
&lt;P&gt;string Query = "load Table P_Texte from 'C:\\kakomdb.server\\communic \\P_Texte.txt'";&lt;/P&gt;
&lt;P&gt;try&lt;BR /&gt;
{&lt;BR /&gt;
   SACommand cmd = Sybase12Con.CreateCommand();&lt;BR /&gt;
   cmd.CommandText = Query;&lt;BR /&gt;
   cmd.CommandTimeout = 1200;&lt;BR /&gt;
   cmd.ExecuteNonQuery();&lt;BR /&gt;
}&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;If I use "load table" and the same big asciifile directly with Interactive SQL it run's fast and perfect too.&lt;/P&gt;
&lt;P&gt;I use a network database connection for both cases.&lt;/P&gt;
&lt;P&gt;Any advice to solve this problem?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2011 02:08:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sacommand-sql-load-table/qaq-p/13841640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-07T02:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: SACommand &amp; SQL load table</title>
      <link>https://community.sap.com/t5/technology-q-a/sacommand-sql-load-table/qaa-p/13841641#M4872484</link>
      <description>&lt;P&gt;&lt;EM&gt;(Note: I do not use SACommand with .NET so I have not tested this.)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;According to the &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbprogramming/programming-api-sacommand-cla-commandtimeout-pro.html"&gt;docs&lt;/A&gt;, the CommandTimeout property is not supported by the SQL Anywhere .NET Data Provider.&lt;/P&gt;
&lt;P&gt;As to the docs, to set a request timeout (here for 30 seconds), use the following example.&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="n"&gt;cmd&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;CommandText&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s"&gt;"SET OPTION request_timeout = 30"&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;cmd&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;ExecuteNonQuery&lt;/SPAN&gt;&lt;SPAN class="p"&gt;();&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 07 Jun 2011 04:32:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sacommand-sql-load-table/qaa-p/13841641#M4872484</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2011-06-07T04:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: SACommand &amp; SQL load table</title>
      <link>https://community.sap.com/t5/technology-q-a/sacommand-sql-load-table/qaa-p/13841642#M4872485</link>
      <description>&lt;P&gt;funny in 11.0.1 it is not said to be non implemented.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2011 07:03:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sacommand-sql-load-table/qaa-p/13841642#M4872485</guid>
      <dc:creator>MCMartin</dc:creator>
      <dc:date>2011-06-07T07:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: SACommand &amp; SQL load table</title>
      <link>https://community.sap.com/t5/technology-q-a/sacommand-sql-load-table/qaa-p/13841643#M4872486</link>
      <description>&lt;P&gt;try cmd.CommandTimeout=0 this should disable the timeout mechanism&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2011 07:03:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sacommand-sql-load-table/qaa-p/13841643#M4872486</guid>
      <dc:creator>MCMartin</dc:creator>
      <dc:date>2011-06-07T07:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: SACommand &amp; SQL load table</title>
      <link>https://community.sap.com/t5/technology-q-a/sacommand-sql-load-table/qaa-p/13841644#M4872487</link>
      <description>&lt;P&gt;You probably want to only set request_timeout for the current connection:&lt;/P&gt;
&lt;P&gt;SET &lt;EM&gt;TEMPORARY&lt;/EM&gt; OPTION request_timeout = 30&lt;/P&gt;
&lt;P&gt;so that the option is not set for all connections with the same user.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2011 08:45:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sacommand-sql-load-table/qaa-p/13841644#M4872487</guid>
      <dc:creator>ian_mchardy</dc:creator>
      <dc:date>2011-06-07T08:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: SACommand &amp; SQL load table</title>
      <link>https://community.sap.com/t5/technology-q-a/sacommand-sql-load-table/qaa-p/13841645#M4872488</link>
      <description>&lt;P&gt;BTW, isn't 0 the default value - i.e. no timeout at all? Or does ADO.Net have a different default value?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2011 09:08:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sacommand-sql-load-table/qaa-p/13841645#M4872488</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2011-06-07T09:08:52Z</dc:date>
    </item>
  </channel>
</rss>

