Problem with first reconnect after standby (WM5)

Problem with first reconnect after standby (WM5)

Postby Boosa » Sat 26 Jun 2010 02:43

Hello,

since today i have a serious problem with reconnecting the device after a system standby to the Database. Device is a Symbol MC90xx with Windows Mobile 5.

When enabling the device again i make sure that the OracleConnection is closed, than open it and close it and get no Exceptions.
But when using the OracleCommand and execute it (ExecuteNonQuery, ExecuteScalar, etc...) than the Error "an operation was attempted on something that is not a socket" comes up.
When closing this error message and trying to execute the same OracleCommand again, everything work fine.
WLAN Signal exists all the time.

Curious is, that my other applications don't have this issue and in this faulty application I did all the things like in the working apps and use the same Devart.Data.Oracle.dll and CF Version.

I work with the devart Version 5.35.79.1 and the CF Runtime Version v2.0.50727

I'm not sure if this is a devart issue but I found a post in this forum where it was declared as a devart issue (CoreLab :-)
http://www.devart.com/forums/viewtopic. ... b0da16577e

Any ideas are very welcome
Thanks and regards...
Boosa
Boosa
 
Posts: 10
Joined: Thu 25 Mar 2010 02:07

Postby Shalex » Tue 29 Jun 2010 12:29

Have you tried setting Pooling=false to OracleConnection.ConnectionString? Does it help?
Also please use the OracleConnection.Ping() method to check if connection object is valid before using it.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Postby Boosa » Wed 30 Jun 2010 00:56

Shalex,

Pooling=false worked for me.
But I found the following post and tried your workaround (while (!Connection.Ping()) because i don't like it to not use the connection pooling due to decreasing performance.

http://www.devart.com/forums/viewtopic. ... 36da092988

This workaround also worked but...
after the session is "reconnected" the Oracle Session Manager shows a new session connected to the DB. When closing the application, all Sessions (one session for each standby) still remains in the Session Browser (Toad) except the last one.

Seems that the System standby makes the OracleConnection lost it's association to the session and the session is waiting to become invalid from the Oracle Server.

So I guess I must catch the event when system is going into standby and then dispose the OracleConnection and reinitialise it when leaving standby.
Boosa
 
Posts: 10
Joined: Thu 25 Mar 2010 02:07

Postby Shalex » Fri 02 Jul 2010 10:29

Boosa wrote:Seems that the System standby makes the OracleConnection lost it's association to the session and the session is waiting to become invalid from the Oracle Server.

So I guess I must catch the event when system is going into standby and then dispose the OracleConnection and reinitialise it when leaving standby.

Yes, you can do that if you don't want to leave an invalid session at the Oracle Server side.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle