The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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 (< 10.000) datasets I got a timeout.

code example:

string Query = "load Table P_Texte from 'C:\kakomdb.server\communic \P_Texte.txt'";

SACommand cmd = Sybase12Con.CreateCommand();
cmd.CommandText = Query;
cmd.CommandTimeout = 1200;

If I use "load table" and the same big asciifile directly with Interactive SQL it run's fast and perfect too.

I use a network database connection for both cases.

Any advice to solve this problem?

asked 07 Jun '11, 02:08

ategeler's gravatar image

accept rate: 0%

edited 07 Jun '11, 06:54

Martin's gravatar image


try cmd.CommandTimeout=0 this should disable the timeout mechanism

(07 Jun '11, 07:03) Martin

(Note: I do not use SACommand with .NET so I have not tested this.)

According to the docs, the CommandTimeout property is not supported by the SQL Anywhere .NET Data Provider.

As to the docs, to set a request timeout (here for 30 seconds), use the following example.

cmd.CommandText = "SET OPTION request_timeout = 30";
permanent link

answered 07 Jun '11, 04:32

Volker%20Barth's gravatar image

Volker Barth
accept rate: 32%

edited 07 Jun '11, 04:33

funny in 11.0.1 it is not said to be non implemented.

(07 Jun '11, 07:03) Martin

You probably want to only set request_timeout for the current connection:

SET TEMPORARY OPTION request_timeout = 30

so that the option is not set for all connections with the same user.

(07 Jun '11, 08:45) Ian McHardy
Replies hidden

BTW, isn't 0 the default value - i.e. no timeout at all? Or does ADO.Net have a different default value?

(07 Jun '11, 09:08) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 07 Jun '11, 02:08

question was seen: 1,355 times

last updated: 07 Jun '11, 09:08