Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

error: Connection to Sybase Server has been lost. All active transaction have been rolled back

599 views
Skip to first unread message

johnyung

unread,
Nov 15, 2004, 12:27:05 PM11/15/04
to
Hi,

When I try to execute a stored procedure that requires > 2
minutes to complet, I often receive the following error
message:

"Connection to Sybase server has been lost. All active
transaction have been rolled back."

I turned off the connection pooling feature (it did not
work), and the stored procedure works fine under VB6
(OleDB). The ASE server did not report any errors.

Please advice,

John Yung

Paul

unread,
Nov 15, 2004, 1:13:39 PM11/15/04
to
Hi John,

We need a little more detail - what exact product are you having trouble
with? And what API are you using? Is it possible the code is setting some
sort of CommandTimeout in the area of the 2 minutes, or however longer it is
that the sproc is taking?

And by VB6 I assume this with ADO? Using the Sybase ASE OLE DB Provider?
And how long is it taking to execute the sproc and is there some sort of
CommandTimeout being set ? (If not specified I believe VB defaults to 30 or
60 seconds)

PV

<John Yung> wrote in message news:4198e6e9.7f8...@sybase.com...

johnyung

unread,
Nov 15, 2004, 2:08:33 PM11/15/04
to
Paul,

I am having problem with Sybase ASE .Net data provider. When
I try to execute the AseCommand.ExecuteNonQuery() methord, I
receive the "Connection to Sybase Server has been last. All
active transaction have been rolled back" error.

When the same stored procedure is executed vith ADO (VB6).
It did not encounter any problems. The stored procedure
takes more than 20 minutes to complete.

I had set the connection timeout value to 0 in the
connection string.

Thanks,
John Yung

Ashish Mahajan

unread,
Nov 16, 2004, 10:09:49 AM11/16/04
to
You need to set AseCommand.CommandTimeout to more than 20 minutes...

HTH,

Ashish

<John Yung> wrote in message news:4198feb0.33...@sybase.com...

Paul

unread,
Nov 16, 2004, 12:25:53 PM11/16/04
to
Hi John,

How long does it take for the message to appear?

Paul

<John Yung> wrote in message news:4198feb0.33...@sybase.com...

johnyung

unread,
Nov 16, 2004, 5:22:55 PM11/16/04
to
Paul,

It takes 35 plus seconds before the error message appears
(after AseCommand.ExecuteReader()).

John Yung

johnyung

unread,
Nov 16, 2004, 5:25:37 PM11/16/04
to
Ashish,

I set the CommandTimeout to 6000 (100 minutes) with the
following connectionstring:

Command Timeout=6000;

Base of RIBO trace, it seems RIBO is able to receive the
data from the database. However, that data never reach the
client; an exception is encounter during the
AseCommand.ExecuteReader() method.

Thanks,

John Yung

Ashish Mahajan

unread,
Nov 18, 2004, 10:10:01 AM11/18/04
to
There is property on AseCommand.CommandTimeout set that...
AseCommand mycmd = new AseCommand();
mycmd.CommandTimeout = 6000
I do not believe that this is a connection string property that we
support...

-Ashish

<John Yung> wrote in message news:419a7e5d.4c...@sybase.com...

johnyung

unread,
Nov 18, 2004, 4:24:28 PM11/18/04
to
That value is set via the connection string. I vertify that
it works in debug mode (CommandTimeout = 0).

John Yung

Ashish Mahajan

unread,
Nov 19, 2004, 10:25:27 AM11/19/04
to
There is a connection string property called "Connection Timeout" but
nothing to do with a command timeout. You need to set
AseCommand.CommandTimeout whose default is 30 seconds.

-Ashish

<John Yung> wrote in message news:419d1308.18c...@sybase.com...

johnyung

unread,
Nov 19, 2004, 2:10:36 PM11/19/04
to
Ashish,

I set the Command timeout property to 6000, but that did not
help.
Still receiving the "Connection to Sybase server has been
lost" error message.

John Yung

Ashish Mahajan

unread,
Nov 19, 2004, 5:09:12 PM11/19/04
to
Please post your test case. We will try to reproduce the problem inhouse. I
apologize for the confusion. I thought you were using the connect string to
set this property.

You can try setting it to 0 (infinite) see if that helps ?

Thanks,

Ashish

<John Yung> wrote in message news:419e452c.581...@sybase.com...

johnyung

unread,
Dec 1, 2004, 6:20:50 PM12/1/04
to
Ashish,

Setting the value to zero did not help.

To get around the problem, I wrote a VB6 DLL that will
execute the stored procedures. I noticed that if I did not
put adoConnection.CursorType = adOpenStatic, I would
encountered similar error (connection lost, or value in
column no longer exist).

Thanks,

John Yung

0 new messages