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.

Good day for all! After closing connection to ASA9 server from my program with this code:

_cn = new AsaConnection();
_cn.Open();

...

_cn.Close();
_cn.Dispose();
_cn = null;

In sybase central connection showed in Connected users tab with last requst COMMIT, and disappears only after closing the program. It normally? How can I really close connection without closing program? Garbage collection not helps...

asked 14 Feb '13, 02:58

NIBERIUM's gravatar image

NIBERIUM
1943814
accept rate: 40%

edited 14 Feb '13, 02:59


This is the expected behaviour - connection pooling is enabled on ADO.NET connections by default. If you wish to disable this behaviour (although it's enabled for performance reasons), you can add POOLING=FALSE to your connection string.

permanent link

answered 14 Feb '13, 09:08

Jeff%20Albion's gravatar image

Jeff Albion
10.7k171174
accept rate: 24%

Connection pooling is enabled by default IIRC. If you disable pooling, this behavior should clear. To do so, change you connection string to disable pooling by adding POOLING=FALSE as in:

 ENG=DEMO12;DBN=DEMO;POOLING=FALSE;UID=UserId;PWD=Pa55W0rd
permanent link

answered 14 Feb '13, 09:14

Chris%20Keating's gravatar image

Chris Keating
2.4k1444
accept rate: 22%

Might be connection pooling (the connection is waiting to be reused) To double check, try a loop to do your stuff >32767 times, if you run out of connections I would say it is a bug.

permanent link

answered 14 Feb '13, 03:58

Martin's gravatar image

Martin
8.6k114149237
accept rate: 14%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×95
×53

question asked: 14 Feb '13, 02:58

question was seen: 826 times

last updated: 14 Feb '13, 09:14