469,927 Members | 1,777 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

ADO.NET - strange behavior

ivb
Hi all,

I am using DB2 8.1.11.1 on NT with ASP.NET 1.1

When application make connection to database (via ADO.NET), it set
"Connection timeout" parameter to 30 seconds.
After, when my webpage requests database, and query execution time
exceeds 30 seconds, the following error reported:

===
[57014] [IBM][DB2/NT] SQL0952N Processing was cancelled due to an
interrupt. SQLSTATE=57014
===

Ok, exception catched and current transaction rolled back.
From this point, the strange behavior begins:


Then application executes any update via this connection again and then
Commit, error occurs:

===
IBM.Data.DB2.DB2Exception: ERROR [2D522] [IBM][DB2/NT] SQL0774N The
statement cannot be executed within an ATOMIC compound SQL statement.
SQLSTATE=2D522
at IBM.Data.DB2.DB2Connection.b(IntPtr A_0, m A_1, x A_2)
at IBM.Data.DB2.DB2Transaction.Commit()
===

transaction also cannot be rolled back, similar error:

===
IBM.Data.DB2.DB2Exception: ERROR [2D522] [IBM][DB2/NT] SQL0774N The
statement cannot be executed within an ATOMIC compound SQL statement.
SQLSTATE=2D522
at IBM.Data.DB2.DB2Connection.b(IntPtr A_0, m A_1, x A_2)
at IBM.Data.DB2.DB2Transaction.Rollback()
===

but executed update locks table rows, and I need restart IIS
application pool to purge connections.

The only workaround I found is make new connection, perform update and
close both connections. Connections closed whithout errors.
But ADO.NET maintains connection pooling, and later, at another pages,
when I connecting database again, and new connection is a old "bad"
connection, it works for select data, but gave error at closing:

===
IBM.Data.DB2.DB2Exception: ERROR [HY010] [IBM] CLI0125E Function
sequence error SQLSTATE=HY010
at IBM.Data.DB2.d.a(Boolean A_0)
at IBM.Data.DB2.DB2ConnPool.a(d A_0, w A_1)
at IBM.Data.DB2.DB2ConnPool.a(Object A_0, Boolean A_1)
at IBM.Data.DB2.q.a(Boolean A_0)
at IBM.Data.DB2.DB2Connection.k()
at IBM.Data.DB2.DB2Connection.Close()
===

then connection became "good" (or killed by connection pool) but
strange behavior ends.

Any ideas?

Apr 5 '06 #1
0 3304

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

36 posts views Thread by Dmitriy Iassenev | last post: by
1 post views Thread by Alexander Inochkin | last post: by
1 post views Thread by Nicholas Palmer | last post: by
19 posts views Thread by david | last post: by
20 posts views Thread by Pilcrow | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.