Problem with first reconnect after standby (WM5)

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Boosa
Posts: 11
Joined: Thu 25 Mar 2010 02:07

Problem with first reconnect after standby (WM5)

Post by 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

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by 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.

Boosa
Posts: 11
Joined: Thu 25 Mar 2010 02:07

Post by 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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by 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.

Post Reply