.Net provider question

.Net provider question

am 10.07.2009 05:59:32 von Gary Smith

Hello,

I've run into an odd problem. I have a connection data management library =
for a project that we have been working with for a while. The purpose of t=
his library was to work around some oddities in the ODBC environment where =
lots of connections were being held open for a long period of time. That's=
not really important though.

Here's the problem. I maintain a list of open connections that are recycle=
d. This is a pretty tight management list. It works great until you do so=
mething stupid like issue restart command to the MySql server at which time=
the connection is broken. What I know is that when this happens, the con=
nection is goes from state=3Dopen to state=3Dclose. This is expected. The=
problem is that it has to cycle through each connection before the good on=
es are loaded.

Is there a way to test a connection prior to using it to find out if it's a=
ctually open? Like pinging the active connection.

If I could do something like that prior to returning the connection, I coul=
d then loop through the connections to check until I get a good one. We ha=
ve all of the general login in place, but the assumption was made that the =
connection state was real time, which is now known to be false.

Any ideas/assistance would be greatly appreciated.

Gary

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

RE: .Net provider question

am 10.07.2009 06:21:09 von Gary Smith

> Is there a way to test a connection prior to using it to find out if
> it's actually open? Like pinging the active connection.
>=20
> If I could do something like that prior to returning the connection, I
> could then loop through the connections to check until I get a good
> one. We have all of the general login in place, but the assumption was
> made that the connection state was real time, which is now known to be
> false.
>=20
> Any ideas/assistance would be greatly appreciated.

As mentioned via the quick PM back... There is a ping.

When I stop using IDBConnection and go with MySqlConnection there is a Ping=
() that doesn't exactly that. I guess I've been spending too much time on =
the MS and Oracle providers...

Gary

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg