How to clear or close connection in connection pool mode?

HI,

I use ADO.NET in connection pool mode, however, we have password change 
mechanism regularly
so that we need to close all existing connections in the connection pool 
once the sybase password
is changed.

In ASEConnection object, I can't find any method to close all connections.

What ways I should handle this situation? Any suggestions are welcome.

Thanks,
Raymond


0
Ray
3/19/2010 4:11:46 PM
sybase.connectivity.adonet 422 articles. 0 followers. Follow

2 Replies
1597 Views

Similar Articles

[PageSpeed] 27
Get it on Google Play
Get it on Apple App Store

Hi

You must have the 2.0 Provider, Ase.AdoNet2.AseClient.dll

Use the props per the MS ADO.NET 2.0 spec on AseConnection:

[AseConnection].ClearPool

ClearAllPools for all the pools

-Paul

"Ray" <lcm@hotmail.com> wrote in message news:4ba3a242$1@forums-1-dub...
> HI,
>
> I use ADO.NET in connection pool mode, however, we have password change 
> mechanism regularly
> so that we need to close all existing connections in the connection pool 
> once the sybase password
> is changed.
>
> In ASEConnection object, I can't find any method to close all connections.
>
> What ways I should handle this situation? Any suggestions are welcome.
>
> Thanks,
> Raymond
>
> 


0
Paul
3/24/2010 7:41:20 PM
I see. Thanks a lot.

"Paul Vero [Sybase]" <pvero@nospam.com> wrote in message 
news:4baa6ae0$1@forums-1-dub...
> Hi
>
> You must have the 2.0 Provider, Ase.AdoNet2.AseClient.dll
>
> Use the props per the MS ADO.NET 2.0 spec on AseConnection:
>
> [AseConnection].ClearPool
>
> ClearAllPools for all the pools
>
> -Paul
>
> "Ray" <lcm@hotmail.com> wrote in message news:4ba3a242$1@forums-1-dub...
>> HI,
>>
>> I use ADO.NET in connection pool mode, however, we have password change 
>> mechanism regularly
>> so that we need to close all existing connections in the connection pool 
>> once the sybase password
>> is changed.
>>
>> In ASEConnection object, I can't find any method to close all 
>> connections.
>>
>> What ways I should handle this situation? Any suggestions are welcome.
>>
>> Thanks,
>> Raymond
>>
>>
>
> 


0
Ray
3/25/2010 2:13:47 AM
Reply:

Similar Artilces:

SFtp connect
The following Ftp connect to a sftp site has the right port/usrname/password [verified thru filezilla], but when I try to connect via TIDFTP -- I get "Connection Closed Gracefully" upon ftp->Connect();; The ftp properties are below the code. I have no other Indy objects on the form. It ocurred to me that I may need something for sftp. ftp->Connect(); if (ftp->Connected()) { ::Sleep(1); } object ftp: TIdFTP AutoLogin = True Host = 'ftp.dailyaccess.com' Password ='XXXXX' Port = 21 Username = 'charles.leggette' ProxySet...

Connection.close() not closing my connection?
My servlet calls con.close() within the finally {} of a try..catch block. Yet I notice that sa_conn_info still lists the connection. Shouldn't the connection disappear from the sa_conn_info list when I close it? And if the answer to that is "yes, it should", has anybody seen situations like mine where it *doesn't* close it? Thanks for your help, Kathleen My bad... through a series of really stupid coding mistakes, I managed to cause a SQLException to be thrown from within the finally {} block before the connection could be closed... and I was ignoring the ...

not connected when I am connected
What do I need to change on my 'puter when the icon in the toolbar shows and tells me I am connected and the error message tells me I am not and I can not go to web pages, get or send emails. I have to close down and restart to get connected again. This only happens if I am on line and leave the 'puter for an hour or so. As long as I am using it I don't have a problem. This just started about a month ago. I am on very slow dialup, DSL and Cable not in my area, thanks you SBC/ATT tks Elaine wrote: > What do I need to change on my 'puter when the icon in ...

how to close database connection, connection pool issue
I have create a asp.net 2.0 application with mysql using the .net/connector 5.1. Most of my pages use a ObjectDataSource control and a Repeater Control. I am calling Close() on both the reader and DB connection but it appears that the connections are not closing and the connection pool gets filled up and I get an error. Does anyone know why the connections aren't closing?  Heres the function that the ObjectDataSource calls:Function myFunc(ByVal subCat As String, ByVal sortBy As String) Dim connStr As String = ConfigurationManager.ConnectionStrings("connector").Co...

Open/Close connection VS. Connection pool?
My site have very heavy traffic and many users reach the database at the sametime. I wonder witch it is the best strategy to connect to the database: open/close the connections as soon as possible OR use a connection pool? If a connection pool it is a better strategy please submit some code in C# about a connection pool. ASP.NET does connection pooling all by itself, presuming connection strings are identical. It will do a better job than you are likely to do, so open as late as possible, close as early as possible, and ASP.NET will handle connection pooling for you.Starting with ASP.NET ...

Connection pool
hi, We are using JConnect 5 and JDK 1.5 in our application. We use connection pool to get the connection and close the connection after using it by con.close(). But appraently the connections are not getting closed and we can see lots of DB connections in the syabse server. Due to this we are running oout of user connections on syabse server. Can someone let me know what could be wrong. We are using Adaptive Server Enterprise/12.0. Thanks Hamid Are you using multiple threads? If yes, you may have more threads than the available connections. > hi, > > We are using...

Switching Connections or Closing All Connections
I have an access database on a different host and unfortunately not able to have it on my own web server and I was curious if there is a way to close all connections to it.  I have tried throwing bad queries to it to throw errors and the database will still not unlock.  I am tired of having to wait for 30 minutes to maybe see it unlock.  It's my first time without being able to control the web server that it's on... Normally I can just shutdown the application via server.  Now I have to use a hosting site and I need to find some efficient way of shutting down the ...

Return connection to connection pool
Hi, I setup a connection pool with ASE .NET data provider with the following connections string: "Data Source='" + syb_ip + "';" + "Port='" + syb_port + "';" + "UID='" + syb_user_id + "';" + "PWD='" + syb_dec_pwd + "';" + "Database='" + syb_db + "';" + "Max Pool Size=" + max_conn + ";&qu...

underlying connection was closed: The connection was closed unexpectedly
Hi ,   I am working with wcf and linq  and i am facing a problem"The underlying connection was closed: The connection was closed unexpectedly. " when i am trying to return my linq query to the client.I tried for changing the code in web.config for client and server.like   Client :   <behaviors> <endpointBehaviors> <behavior name="debuggingBehaviour"> <dataContractSerializer maxItemsInObjectGraph="2147483646" />                 &nb...

difference between connection.close and command.connection.close
hello, What is the difference between odbcconnection.close and odbccommand.connection.close? I am making connection once in my application in global.asax and opening connection at application_start event and closing it at application_end event. I am accessing connection through "global.myconnection" in webforms. NOw in the webforms,do I have to mycommand.connection.open before comand.executereader?? Does mycommand.connection.close , closes the odbcconnection that I make in gloabl.asax? It is confusing, because on the first function executing on webform, when I myc...

connection pooling and open connections
Hi Dmitry, I have connection pooling enabled and I'm connecting to MySQL with 2 AdConnection at the same time. Is it normal that I see 2 active connections on MySQL management and not just one? I thought that when using connection pooling they would share the same one. Thanks, Lorenzo Hello Lorenzo > Is it normal that I see 2 active connections on MySQL management and not > just one? FireDAC does not open the pooled connections before they will be really needed. Instead FireDAC returns open connections back to pool instead of closing them, when they are no l...

The connection is already open and the connection state is connecting.
Hello, I am getting this error time to time randomly. My web application is built on asp.net 3.5 which uses ODBC 5.1 driver to connect to mysql database. I have a separate database class which handles the connection, execute, fetching and all. The application runs fine for sometime then suddenly the users start getting this error after which the application fails to insert select from database. I have posted in this forum couple of times now and no one is really contributing or helping me. Please..Any help will be highly appreciated.. Many thanks, Viv The database abstract loo...

Single open connection vs connection pool (opening and closing each time)
I see that log4net use single open connection instead of connection pool. They don't open and close the connection each time they just do it once in the beginning.  What are the risks of such approach in a multythreaded environment?  What can happen if two threads want to use the connection at the same time?  Is there a risk associated with that?  The fact is that if using just a single connection there is a performance benefit, then what is the down side? Or we are just wrong by doint this? using(var c = new SqlConnection(str)){   // use connection ......

When we call a method from a class that opens a connection and connection is never closed so what's happeneing with connection?
When we call a method from a class that opens a connection and returns a DataReader after we used a DataReader what's happen with connection that is open? For Example: --------------------------------------------- public SqlDataReader GetProductCategories() { // Create Instance of Connection and Command Object SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]); SqlCommand myCommand = new SqlCommand("ProductCategoryList", myConnection); // Ma...

Web resources about - How to clear or close connection in connection pool mode? - sybase.connectivity.adonet

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
If you send more email, you might make more money. Then again, you might destroy your reputation and revenue stream. Here's how to know what ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

MOTHER’S DAY: Facebook Examines Connections Between Moms, Kids
With Mother’s Day on the calendar this coming Sunday, Facebook examined the relationships between mothers and their children on the social network, ...

Police tear open roof to arrest man in connection with stabbing murder
Police have torn open the roof of a Gold Coast home to arrest a man in connection with the stabbing death of 16-year-old Michael Brack.

Paris attacks: Belgium connection probed as terrorist past of Brussels district of Molenbeek under spotlight ...
Prosecutors reveal a growing Belgian connection to the deadly Paris attacks, focusing on a poor Brussels district.

Half of data connections by top 500 Android apps are 'covert' with no effect on user experience
Researchers at the Massachusetts Institute of Technology have discovered that half of the communications connections established by the top free ...

Don’t Let Great Content Fall on Deaf Ears: Know your Connection Strategy
... via employee newsletter when it should have come through small-group manager meetings All of these and more are the result of a faulty connection ...

Brussels Connection Under Spotlight After Paris Killings
(EurActiv) — Prosecutors on Sunday disclosed a growing Belgian connection to the Paris attacks as Premier Charles Michel conceded that a Brussels ...

Be Goofy, Smile At Your Baby: Protection Begins with Connection, Pediatrician Says
VideoPart 3 of a series Andrew Garner wears silly ties and finds it easy to make a goofy face. These are valuable tools for charming the babies ...

Resources last updated: 11/22/2015 10:10:34 AM